@kjun-ui/native 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2271,36 +2271,6 @@ function KjunSkeleton({
2271
2271
  ))
2272
2272
  }
2273
2273
  ),
2274
- type === "chart" && /* @__PURE__ */ jsxs7(View10, { style: [frame, { height: height || tokens11.extensions.skeleton.chartHeight }], children: [
2275
- /* @__PURE__ */ jsx15(
2276
- View10,
2277
- {
2278
- style: {
2279
- flex: 1,
2280
- flexDirection: "row",
2281
- alignItems: "flex-end",
2282
- justifyContent: "space-around",
2283
- gap: tokens11.extensions.skeleton.gap
2284
- // Bars stand on the axis line, like ChartSkeleton.
2285
- },
2286
- children: [40, 65, 50, 80, 60, 90, 75].map((h, i) => /* @__PURE__ */ jsx15(
2287
- Animated6.View,
2288
- {
2289
- style: {
2290
- flex: 1,
2291
- maxWidth: tokens11.extensions.skeleton.chartBarMaxWidth,
2292
- height: `${h}%`,
2293
- backgroundColor: shimmer,
2294
- borderTopLeftRadius: tokens11.radius.radius4,
2295
- borderTopRightRadius: tokens11.radius.radius4
2296
- }
2297
- },
2298
- i
2299
- ))
2300
- }
2301
- ),
2302
- block("100%", tokens11.extensions.skeleton.chartAxisHeight, { backgroundColor: colors.border })
2303
- ] }),
2304
2274
  type === "stat" && /* @__PURE__ */ jsxs7(
2305
2275
  View10,
2306
2276
  {
@@ -6279,9 +6249,23 @@ var KjunErrorBoundary = class extends Component {
6279
6249
 
6280
6250
  // packages/native/src/skeletons.tsx
6281
6251
  import { tokens as tokens37 } from "@kjun-ui/tokens";
6282
- import { Fragment as Fragment11, useEffect as useEffect22, useRef as useRef28 } from "react";
6283
- import { Animated as Animated17, View as View32, useWindowDimensions as useWindowDimensions6 } from "react-native";
6284
- import Svg5, { G as G2, Path as Path4, Rect as Rect3 } from "react-native-svg";
6252
+ import { useEffect as useEffect22, useRef as useRef28, useState as useState32 } from "react";
6253
+ import { Animated as Animated17, Platform as Platform24, View as View32, useWindowDimensions as useWindowDimensions6 } from "react-native";
6254
+ import Svg5, { Path as Path4 } from "react-native-svg";
6255
+
6256
+ // shared/package-runtime/chart-skeleton.ts
6257
+ var chartFrameViewBox = "0 0 600 240";
6258
+ var chartFramePath = "M20 10V220H590 M20 65H590 M20 120H590 M20 175H590";
6259
+ var chartSkeletonMaxCount = 100;
6260
+ function chartSkeletonCount(value) {
6261
+ return Number.isFinite(value) ? Math.min(chartSkeletonMaxCount, Math.max(1, Math.floor(value))) : 1;
6262
+ }
6263
+ function chartMatrixMuted(row, column) {
6264
+ return (row + column + 2) % 3 === 0;
6265
+ }
6266
+ function chartDonutHole(height, thickness) {
6267
+ return Math.max(0, height * 0.8 - 2 * thickness);
6268
+ }
6285
6269
 
6286
6270
  // packages/native/src/market-skeleton.tsx
6287
6271
  import { tokens as tokens36 } from "@kjun-ui/tokens";
@@ -6339,7 +6323,7 @@ function KjunMarketTableSkeleton({ columns = [], rows = 8, showActions = false }
6339
6323
  }
6340
6324
 
6341
6325
  // packages/native/src/skeletons.tsx
6342
- import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
6326
+ import { Fragment as Fragment11, jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
6343
6327
  function KjunListSkeleton({
6344
6328
  rows = 8,
6345
6329
  variant = "market",
@@ -6440,26 +6424,23 @@ function KjunFormSkeleton({
6440
6424
  }
6441
6425
  );
6442
6426
  }
6427
+ var chartPart = (name) => Platform24.OS === "web" ? { dataSet: { kjunChartPart: name } } : {};
6443
6428
  function KjunChartSkeleton({
6429
+ kind = "frame",
6430
+ height = tokens37.extensions.chartSkeleton.height,
6444
6431
  loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
6445
- kind = "line",
6446
- height = tokens37.extensions.chartSkeleton.height
6432
+ skeleton = true,
6433
+ loadingDelay = 0,
6434
+ rows = 8,
6435
+ columns = 14
6447
6436
  }) {
6448
- const { colors } = useKjunStyles(), reduced = useReducedMotion(), opacity = useRef28(new Animated17.Value(1)).current;
6437
+ const { colors } = useKjunStyles(), reduced = useReducedMotion(), opacity = useRef28(new Animated17.Value(1)).current, revealed = useLoadingReveal(true, loadingDelay), [measured, setMeasured] = useState32(0), thickness = tokens37.extensions.chartSkeleton.donutThickness, boxHeight = typeof height === "number" ? height : measured, hole = boxHeight > 0 ? chartDonutHole(boxHeight, thickness) : void 0, rowCount = chartSkeletonCount(rows), columnCount = chartSkeletonCount(columns), status = revealed && loadingText ? "status" : void 0, hidden = { "aria-hidden": true, importantForAccessibility: "no-hide-descendants" };
6449
6438
  useEffect22(() => {
6450
- if (reduced) return;
6439
+ if (reduced || !skeleton) return;
6451
6440
  const loop = Animated17.loop(
6452
6441
  Animated17.sequence([
6453
- Animated17.timing(opacity, {
6454
- toValue: 0.55,
6455
- duration: tokens37.motion.shimmer / 2,
6456
- useNativeDriver: true
6457
- }),
6458
- Animated17.timing(opacity, {
6459
- toValue: 1,
6460
- duration: tokens37.motion.shimmer / 2,
6461
- useNativeDriver: true
6462
- })
6442
+ Animated17.timing(opacity, { toValue: 0.55, duration: tokens37.motion.shimmer / 2, useNativeDriver: true }),
6443
+ Animated17.timing(opacity, { toValue: 1, duration: tokens37.motion.shimmer / 2, useNativeDriver: true })
6463
6444
  ])
6464
6445
  );
6465
6446
  loop.start();
@@ -6467,92 +6448,67 @@ function KjunChartSkeleton({
6467
6448
  loop.stop();
6468
6449
  opacity.setValue(1);
6469
6450
  };
6470
- }, [opacity, reduced]);
6471
- return /* @__PURE__ */ jsxs26(
6451
+ }, [opacity, reduced, skeleton]);
6452
+ return /* @__PURE__ */ jsx39(
6472
6453
  Animated17.View,
6473
6454
  {
6474
- style: {
6475
- height,
6476
- alignItems: "center",
6477
- justifyContent: "center",
6478
- width: "100%",
6479
- minWidth: 0,
6480
- opacity
6481
- },
6482
- accessibilityElementsHidden: true,
6483
- importantForAccessibility: "no-hide-descendants",
6484
- children: [
6455
+ onLayout: typeof height === "number" ? void 0 : (event) => setMeasured(event.nativeEvent.layout.height),
6456
+ style: { height, alignItems: "center", justifyContent: "center", width: "100%", minWidth: 0, opacity: revealed ? opacity : 0 },
6457
+ "aria-hidden": revealed ? void 0 : true,
6458
+ importantForAccessibility: revealed ? void 0 : "no-hide-descendants",
6459
+ ...Platform24.OS === "web" ? { dataSet: { kjunChartKind: kind, skeleton: skeleton ? void 0 : "false" } } : {},
6460
+ children: !skeleton ? /* @__PURE__ */ jsxs26(View32, { ...chartPart("loading"), role: status, style: { alignItems: "center", gap: tokens37.dimension.value12 }, children: [
6461
+ /* @__PURE__ */ jsx39(View32, { ...hidden, children: /* @__PURE__ */ jsx39(KjunSpinner, { size: "md" }) }),
6462
+ !!loadingText && /* @__PURE__ */ jsx39(KText, { style: { ...typeStyle("body"), color: colors.textSecondary, textAlign: "center", maxWidth: "100%" }, children: loadingText })
6463
+ ] }) : /* @__PURE__ */ jsxs26(Fragment11, { children: [
6485
6464
  kind === "donut" ? /* @__PURE__ */ jsx39(
6486
6465
  View32,
6487
6466
  {
6488
- style: {
6489
- height: "80%",
6490
- aspectRatio: 1,
6491
- borderWidth: tokens37.extensions.chartSkeleton.donutThickness,
6492
- borderColor: colors.skeleton,
6493
- borderRadius: tokens37.radius.radius9999,
6494
- alignItems: "center",
6495
- justifyContent: "center"
6496
- },
6497
- children: /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", width: tokens37.extensions.chartSkeleton.donutLabelWidth, height: tokens37.extensions.chartSkeleton.donutLabelHeight })
6467
+ ...chartPart("donut"),
6468
+ ...hidden,
6469
+ style: { height: "80%", aspectRatio: 1, borderWidth: thickness, borderColor: colors.skeleton, borderRadius: tokens37.radius.radius9999 }
6498
6470
  }
6499
- ) : /* @__PURE__ */ jsxs26(
6500
- Svg5,
6471
+ ) : kind === "matrix" ? /* @__PURE__ */ jsx39(View32, { ...chartPart("matrix"), ...hidden, style: { alignSelf: "stretch", flex: 1, gap: tokens37.dimension.value4 }, children: Array.from({ length: rowCount }, (_, row) => /* @__PURE__ */ jsx39(View32, { style: { flex: 1, flexDirection: "row", gap: tokens37.dimension.value4 }, children: Array.from({ length: columnCount }, (_2, column) => /* @__PURE__ */ jsx39(
6472
+ View32,
6501
6473
  {
6502
- viewBox: "0 0 600 240",
6503
- preserveAspectRatio: "none",
6504
- width: "100%",
6505
- height: "100%",
6506
- children: [
6507
- /* @__PURE__ */ jsx39(
6508
- Path4,
6509
- {
6510
- d: "M20 10V220H590 M20 65H590 M20 120H590 M20 175H590",
6511
- fill: "none",
6512
- stroke: colors.border,
6513
- strokeWidth: 1
6514
- }
6515
- ),
6516
- kind === "line" && /* @__PURE__ */ jsx39(Path4, { d: "M20 190 L100 160 L180 172 L260 120 L340 140 L420 96 L500 110 L590 64", fill: "none", stroke: colors.skeleton, strokeWidth: 4, strokeLinecap: "round", strokeLinejoin: "round" }),
6517
- kind === "matrix" ? Array.from({ length: 8 }, (_, row) => /* @__PURE__ */ jsx39(G2, { children: Array.from({ length: 14 }, (_2, col) => /* @__PURE__ */ jsx39(
6518
- Rect3,
6519
- {
6520
- x: 24 + col * 40,
6521
- y: 12 + row * 26,
6522
- width: 36,
6523
- height: 22,
6524
- rx: 2,
6525
- fill: colors.skeleton,
6526
- opacity: (row + col + 2) % 3 === 0 ? 0.55 : 1
6474
+ ...chartPart("cell"),
6475
+ style: {
6476
+ flex: 1,
6477
+ borderRadius: tokens37.extensions.skeleton.lineRadius,
6478
+ backgroundColor: colors.skeleton,
6479
+ opacity: chartMatrixMuted(row, column) ? tokens37.states.opacity.pending : 1
6480
+ }
6481
+ },
6482
+ column
6483
+ )) }, row)) }) : /* @__PURE__ */ jsx39(View32, { ...chartPart("plot"), ...hidden, style: { alignSelf: "stretch", flex: 1 }, children: /* @__PURE__ */ jsx39(Svg5, { viewBox: chartFrameViewBox, preserveAspectRatio: "none", width: "100%", height: "100%", children: /* @__PURE__ */ jsx39(Path4, { d: chartFramePath, fill: "none", stroke: colors.chartGrid, strokeWidth: tokens37.border.defaultWidth, vectorEffect: "non-scaling-stroke" }) }) }),
6484
+ !!loadingText && /* @__PURE__ */ jsx39(
6485
+ View32,
6486
+ {
6487
+ ...chartPart("status"),
6488
+ role: status,
6489
+ pointerEvents: "none",
6490
+ style: { position: "absolute", inset: 0, alignItems: "center", justifyContent: "center" },
6491
+ children: /* @__PURE__ */ jsx39(
6492
+ KText,
6493
+ {
6494
+ style: {
6495
+ ...typeStyle("body"),
6496
+ paddingHorizontal: tokens37.dimension.value12,
6497
+ paddingVertical: tokens37.dimension.value4,
6498
+ borderRadius: tokens37.radius.radius6,
6499
+ borderWidth: kind === "donut" ? 0 : tokens37.border.defaultWidth,
6500
+ borderColor: colors.chartGrid,
6501
+ backgroundColor: colors.surface,
6502
+ color: colors.textSecondary,
6503
+ maxWidth: kind === "donut" && hole != null ? hole : "90%",
6504
+ textAlign: "center"
6527
6505
  },
6528
- col
6529
- )) }, row)) : (kind === "bar" || kind === "candle") && [60, 100, 85, 140, 110, 165, 180].map((h, i) => /* @__PURE__ */ jsxs26(Fragment11, { children: [
6530
- kind === "candle" && /* @__PURE__ */ jsx39(
6531
- Path4,
6532
- {
6533
- d: `M${55 + i * 75} ${195 - h}V${225 - h / 2}`,
6534
- fill: "none",
6535
- stroke: colors.skeleton,
6536
- strokeWidth: 4
6537
- }
6538
- ),
6539
- /* @__PURE__ */ jsx39(
6540
- Rect3,
6541
- {
6542
- x: 35 + i * 75,
6543
- y: kind === "candle" ? 210 - h : 220 - h,
6544
- width: kind === "candle" ? 28 : 42,
6545
- height: kind === "candle" ? h / 2 : h,
6546
- rx: 3,
6547
- fill: colors.skeleton
6548
- }
6549
- )
6550
- ] }, i))
6551
- ]
6506
+ children: loadingText
6507
+ }
6508
+ )
6552
6509
  }
6553
- ),
6554
- /* @__PURE__ */ jsx39(View32, { pointerEvents: "none", style: { position: "absolute", inset: 0, alignItems: "center", justifyContent: "center", gap: tokens37.dimension.value12 }, children: !!loadingText && /* @__PURE__ */ jsx39(KText, { style: { ...typeStyle("body"), paddingHorizontal: tokens37.dimension.value12, paddingVertical: tokens37.dimension.value4, borderRadius: tokens37.radius.radius6, backgroundColor: colors.surface, color: colors.textSecondary, maxWidth: "90%", textAlign: "center" }, children: loadingText }) })
6555
- ]
6510
+ )
6511
+ ] })
6556
6512
  }
6557
6513
  );
6558
6514
  }
@@ -6576,7 +6532,7 @@ import Svg6, {
6576
6532
  import { tokens as tokens39 } from "@kjun-ui/tokens";
6577
6533
 
6578
6534
  // shared/package-runtime/use-number-motion.ts
6579
- import { useLayoutEffect as useLayoutEffect12, useRef as useRef29, useState as useState32 } from "react";
6535
+ import { useLayoutEffect as useLayoutEffect12, useRef as useRef29, useState as useState33 } from "react";
6580
6536
 
6581
6537
  // shared/package-runtime/number-motion.ts
6582
6538
  import { tokens as tokens38 } from "@kjun-ui/tokens";
@@ -6622,7 +6578,7 @@ function createNumberMotion(apply) {
6622
6578
 
6623
6579
  // shared/package-runtime/use-number-motion.ts
6624
6580
  function useNumberMotion(value, animated, fromPrevious, reduced) {
6625
- const [display, setDisplay] = useState32(typeof value === "string" || fromPrevious || !animated || reduced ? value : 0);
6581
+ const [display, setDisplay] = useState33(typeof value === "string" || fromPrevious || !animated || reduced ? value : 0);
6626
6582
  const motion = useRef29(null);
6627
6583
  if (!motion.current) motion.current = createNumberMotion(setDisplay);
6628
6584
  useLayoutEffect12(() => {
@@ -7109,7 +7065,7 @@ function KjunSparkline({
7109
7065
 
7110
7066
  // shared/package-runtime/table.ts
7111
7067
  import { nextTableSort } from "@kjun-ui/tokens";
7112
- import { useEffect as useEffect24, useRef as useRef31, useState as useState34 } from "react";
7068
+ import { useEffect as useEffect24, useRef as useRef31, useState as useState35 } from "react";
7113
7069
 
7114
7070
  // shared/package-runtime/table-model.ts
7115
7071
  function getValue(row, key) {
@@ -7153,10 +7109,10 @@ function useTableModel(props) {
7153
7109
  expandSingle = false,
7154
7110
  onExpandedRowsChange
7155
7111
  } = props;
7156
- const [internalSort, setSort] = useState34({
7112
+ const [internalSort, setSort] = useState35({
7157
7113
  key: "",
7158
7114
  order: "asc"
7159
- }), [internalExpanded, setExpanded] = useState34([]), [search, setSearch] = useState34(""), timer = useRef31(void 0);
7115
+ }), [internalExpanded, setExpanded] = useState35([]), [search, setSearch] = useState35(""), timer = useRef31(void 0);
7160
7116
  useEffect24(() => () => clearTimeout(timer.current), []);
7161
7117
  const sort = props.sort === void 0 ? internalSort : (_a = props.sort) != null ? _a : { key: "", order: "asc" };
7162
7118
  const rows = sortTableRows(data, sort, { sortable, sortMode });
@@ -7311,14 +7267,14 @@ function TableToolbar({
7311
7267
 
7312
7268
  // packages/native/src/table-grid.tsx
7313
7269
  import { tokens as tokens42 } from "@kjun-ui/tokens";
7314
- import { Fragment as Fragment14, useId as useId9, useState as useState35 } from "react";
7315
- import Svg7, { Defs as Defs3, LinearGradient as LinearGradient3, Rect as Rect4, Stop as Stop3 } from "react-native-svg";
7270
+ import { Fragment as Fragment14, useId as useId9, useState as useState36 } from "react";
7271
+ import Svg7, { Defs as Defs3, LinearGradient as LinearGradient3, Rect as Rect3, Stop as Stop3 } from "react-native-svg";
7316
7272
  import { ScrollView as ScrollView9, View as View36 } from "react-native";
7317
7273
  import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
7318
7274
  function TableGrid({ initialLoading, skeletonRows, skeletonHidden, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable }) {
7319
7275
  const { colors } = useKjunStyles();
7320
7276
  const geometry2 = tokens42.table;
7321
- const [scroll, setScroll] = useState35({ viewport: 0, x: 0 }), fadeId = "kjun-table-fade-" + useId9().replace(/[^a-z0-9]/gi, "");
7277
+ const [scroll, setScroll] = useState36({ viewport: 0, x: 0 }), fadeId = "kjun-table-fade-" + useId9().replace(/[^a-z0-9]/gi, "");
7322
7278
  const cellPadding = geometry2.cellPadding[compact ? "compact" : "regular"];
7323
7279
  const width = (col) => typeof col.width === "number" ? col.width : typeof col.width === "string" && /^\d+(px)?$/.test(col.width) ? parseFloat(col.width) : geometry2.columnWidth;
7324
7280
  const totalWidth = visible.reduce((sum, col) => sum + width(col), 0) + (selectable ? geometry2.actionColumnWidth : 0) + (expandable ? geometry2.actionColumnWidth : 0);
@@ -7505,7 +7461,7 @@ function TableGrid({ initialLoading, skeletonRows, skeletonHidden, state, onRowC
7505
7461
  /* @__PURE__ */ jsx43(Stop3, { offset: "0", stopColor: colors.surface, stopOpacity: 0 }),
7506
7462
  /* @__PURE__ */ jsx43(Stop3, { offset: "1", stopColor: colors.surface, stopOpacity: 1 })
7507
7463
  ] }) }),
7508
- /* @__PURE__ */ jsx43(Rect4, { width: "100%", height: "100%", fill: `url(#${fadeId})` })
7464
+ /* @__PURE__ */ jsx43(Rect3, { width: "100%", height: "100%", fill: `url(#${fadeId})` })
7509
7465
  ] }) })
7510
7466
  ] });
7511
7467
  }
@@ -8068,7 +8024,7 @@ function KjunKpiHero(props) {
8068
8024
 
8069
8025
  // packages/native/src/kpi-row.tsx
8070
8026
  import { tokens as tokens46 } from "@kjun-ui/tokens";
8071
- import { useState as useState36 } from "react";
8027
+ import { useState as useState37 } from "react";
8072
8028
  import {
8073
8029
  Text as Text6,
8074
8030
  View as View41,
@@ -8087,7 +8043,7 @@ function KjunKpiRow({
8087
8043
  const { colors, domainColors, numericFontFamily, fontFamily } = useKjunStyles(), mobile = useWindowDimensions9().width <= tokens46.responsive.kpiRow, small = size === "sm", summary = mobileSummary && mobile && !small;
8088
8044
  const geometry2 = tokens46.extensions.kpiRow;
8089
8045
  const spec = small ? geometry2.sm : mobile ? geometry2.mobile : geometry2.md;
8090
- const [width, setWidth] = useState36(0);
8046
+ const [width, setWidth] = useState37(0);
8091
8047
  const paddingX = summary ? geometry2.summary.paddingX : spec.paddingX;
8092
8048
  const gapX = summary ? geometry2.summary.gapX : 0;
8093
8049
  const explicit = items.some(
@@ -8306,7 +8262,7 @@ import { tokens as tokens48 } from "@kjun-ui/tokens";
8306
8262
  import { ScrollView as ScrollView10, View as View43 } from "react-native";
8307
8263
 
8308
8264
  // shared/package-runtime/market-cards.ts
8309
- import { useEffect as useEffect25, useRef as useRef32, useState as useState37 } from "react";
8265
+ import { useEffect as useEffect25, useRef as useRef32, useState as useState38 } from "react";
8310
8266
  function useMarketCardsModel(props, persistence) {
8311
8267
  const {
8312
8268
  columns,
@@ -8322,7 +8278,7 @@ function useMarketCardsModel(props, persistence) {
8322
8278
  sortKey: c.sortable ? metricConfig[c.key].sortKey : null,
8323
8279
  isDefaultSort: c.defaultSort
8324
8280
  }));
8325
- const [key, setKey] = useState37(""), restoreSignature = JSON.stringify([storageNamespace, pills]);
8281
+ const [key, setKey] = useState38(""), restoreSignature = JSON.stringify([storageNamespace, pills]);
8326
8282
  const mounted = useRef32("");
8327
8283
  const save = (key2) => {
8328
8284
  var _a;
@@ -8811,9 +8767,9 @@ function KjunMarketListPanel({
8811
8767
 
8812
8768
  // packages/native/src/market-table.tsx
8813
8769
  import { tokens as tokens51 } from "@kjun-ui/tokens";
8814
- import { useId as useId10, useState as useState38 } from "react";
8770
+ import { useId as useId10, useState as useState39 } from "react";
8815
8771
  import { ScrollView as ScrollView11, View as View46 } from "react-native";
8816
- import Svg8, { Defs as Defs4, LinearGradient as LinearGradient4, Rect as Rect5, Stop as Stop4 } from "react-native-svg";
8772
+ import Svg8, { Defs as Defs4, LinearGradient as LinearGradient4, Rect as Rect4, Stop as Stop4 } from "react-native-svg";
8817
8773
  import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
8818
8774
  function KjunMarketTable(props) {
8819
8775
  const {
@@ -8897,7 +8853,7 @@ function KjunMarketTable(props) {
8897
8853
  );
8898
8854
  };
8899
8855
  const layout = useMarketLayout(columns, showActions);
8900
- const [scroll, setScroll] = useState38({ viewport: 0, x: 0 }), fadeId = "kjun-market-fade-" + useId10().replace(/[^a-z0-9]/gi, "");
8856
+ const [scroll, setScroll] = useState39({ viewport: 0, x: 0 }), fadeId = "kjun-market-fade-" + useId10().replace(/[^a-z0-9]/gi, "");
8901
8857
  const tableQuote = { price: {}, change: { fontWeight: typeStyle("body").fontWeight } };
8902
8858
  return /* @__PURE__ */ jsxs40(
8903
8859
  View46,
@@ -9107,7 +9063,7 @@ function KjunMarketTable(props) {
9107
9063
  /* @__PURE__ */ jsx53(Stop4, { offset: "0", stopColor: colors.surface, stopOpacity: 0 }),
9108
9064
  /* @__PURE__ */ jsx53(Stop4, { offset: "1", stopColor: colors.surface, stopOpacity: 1 })
9109
9065
  ] }) }),
9110
- /* @__PURE__ */ jsx53(Rect5, { width: "100%", height: "100%", fill: `url(#${fadeId})` })
9066
+ /* @__PURE__ */ jsx53(Rect4, { width: "100%", height: "100%", fill: `url(#${fadeId})` })
9111
9067
  ] }) })
9112
9068
  ] }) })
9113
9069
  }
@@ -9121,7 +9077,7 @@ function KjunMarketTable(props) {
9121
9077
  // packages/native/src/list.tsx
9122
9078
  import { tokens as tokens52 } from "@kjun-ui/tokens";
9123
9079
  import { Children as Children4, createContext as createContext20, useContext as useContext17 } from "react";
9124
- import { View as View47, Platform as Platform24 } from "react-native";
9080
+ import { View as View47, Platform as Platform25 } from "react-native";
9125
9081
  import { Fragment as Fragment18, jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
9126
9082
  var LastListRow = createContext20(false);
9127
9083
  function KjunListRow({ title, description, leading, trailing, actions, href, disabled = false, onPress }) {
@@ -9136,8 +9092,8 @@ function KjunListRow({ title, description, leading, trailing, actions, href, dis
9136
9092
  ] });
9137
9093
  const style = { flex: 1, minWidth: 0, minHeight: tokens52.extensions.list.minimumHeight, flexDirection: "row", alignItems: "center", gap: tokens52.extensions.list.gap, padding: tokens52.extensions.list.padding };
9138
9094
  return /* @__PURE__ */ jsxs41(View47, { role: "listitem", style: { flexDirection: "row", alignItems: "center", gap: tokens52.extensions.list.gap, borderBottomWidth: last ? 0 : tokens52.border.defaultWidth, borderBottomColor: colors.divider }, children: [
9139
- onPress || href ? /* @__PURE__ */ jsx54(AccessiblePressable, { ...Platform24.OS === "web" && href && !disabled ? { href } : {}, accessibilityRole: href ? "link" : "button", accessibilityLabel: title + (description ? ", " + description : ""), disabled, accessibilityState: { disabled }, onPress, style: ({ pressed }) => ({ ...style, opacity: disabled ? tokens52.states.opacity.disabled : 1, backgroundColor: pressed ? colors.hover : "transparent" }), children: parts }) : /* @__PURE__ */ jsx54(View47, { style, children: parts }),
9140
- actions && /* @__PURE__ */ jsx54(View47, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform24.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens52.extensions.list.actionsGap, paddingRight: tokens52.extensions.list.actionsPadding, opacity: disabled ? tokens52.states.opacity.disabled : 1 }, children: content(actions) })
9095
+ onPress || href ? /* @__PURE__ */ jsx54(AccessiblePressable, { ...Platform25.OS === "web" && href && !disabled ? { href } : {}, accessibilityRole: href ? "link" : "button", accessibilityLabel: title + (description ? ", " + description : ""), disabled, accessibilityState: { disabled }, onPress, style: ({ pressed }) => ({ ...style, opacity: disabled ? tokens52.states.opacity.disabled : 1, backgroundColor: pressed ? colors.hover : "transparent" }), children: parts }) : /* @__PURE__ */ jsx54(View47, { style, children: parts }),
9096
+ actions && /* @__PURE__ */ jsx54(View47, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform25.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens52.extensions.list.actionsGap, paddingRight: tokens52.extensions.list.actionsPadding, opacity: disabled ? tokens52.states.opacity.disabled : 1 }, children: content(actions) })
9141
9097
  ] });
9142
9098
  }
9143
9099
  function KjunListSection({ title, description, actions, children, ariaLabel }) {
@@ -9156,16 +9112,16 @@ function KjunListSection({ title, description, actions, children, ariaLabel }) {
9156
9112
 
9157
9113
  // packages/native/src/app-navigation.tsx
9158
9114
  import { tokens as tokens53 } from "@kjun-ui/tokens";
9159
- import { Children as Children5, Fragment as Fragment19, isValidElement as isValidElement7, useState as useState39 } from "react";
9160
- import { View as View48, Platform as Platform25 } from "react-native";
9115
+ import { Children as Children5, Fragment as Fragment19, isValidElement as isValidElement7, useState as useState40 } from "react";
9116
+ import { View as View48, Platform as Platform26 } from "react-native";
9161
9117
  import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
9162
9118
  function KjunTopNavigation({ title, description, leading, actions, safeAreaTop = 0 }) {
9163
9119
  const { colors } = useKjunStyles();
9164
9120
  const geometry2 = tokens53.extensions.topNavigation;
9165
9121
  const titleInset = Math.max(0, (geometry2.controlSize - tokens53.typography.sectionTitle.lineHeightPx) / 2);
9166
- const wrapping = Platform25.OS === "web" ? { wordBreak: "keep-all", overflowWrap: "anywhere" } : {};
9122
+ const wrapping = Platform26.OS === "web" ? { wordBreak: "keep-all", overflowWrap: "anywhere" } : {};
9167
9123
  const edgeInset = (geometry2.controlSize - geometry2.iconSize) / 2;
9168
- const [iconEdges, setIconEdges] = useState39({ leading: false, trailing: false });
9124
+ const [iconEdges, setIconEdges] = useState40({ leading: false, trailing: false });
9169
9125
  const square = (key) => (event) => {
9170
9126
  const { width, height } = event.nativeEvent.layout;
9171
9127
  const next = Math.abs(width - height) < 1 && Math.abs(height - geometry2.controlSize) < 1;
@@ -9210,8 +9166,8 @@ function KjunBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\u
9210
9166
  AccessiblePressable,
9211
9167
  {
9212
9168
  focusRingInset: true,
9213
- ...Platform25.OS === "web" ? { href: item.disabled ? void 0 : item.href, "aria-current": selected ? "page" : void 0 } : {},
9214
- accessibilityRole: Platform25.OS === "web" && item.href ? "link" : "button",
9169
+ ...Platform26.OS === "web" ? { href: item.disabled ? void 0 : item.href, "aria-current": selected ? "page" : void 0 } : {},
9170
+ accessibilityRole: Platform26.OS === "web" && item.href ? "link" : "button",
9215
9171
  accessibilityLabel: item.label + (item.badge != null ? ", " + item.badge : ""),
9216
9172
  accessibilityState: { selected, disabled: !!item.disabled },
9217
9173
  disabled: item.disabled,
@@ -9245,10 +9201,10 @@ function KjunBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\u
9245
9201
  }
9246
9202
  function KjunBottomActionBar({ description, children, safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = false }) {
9247
9203
  const { colors } = useKjunStyles();
9248
- const [width, setWidth] = useState39(0);
9204
+ const [width, setWidth] = useState40(0);
9249
9205
  const geometry2 = tokens53.extensions.navigation;
9250
9206
  const wide = width >= tokens53.responsive.bottomAction + geometry2.padding * 2;
9251
- const wrapping = Platform25.OS === "web" ? { wordBreak: "keep-all", overflowWrap: "anywhere" } : {};
9207
+ const wrapping = Platform26.OS === "web" ? { wordBreak: "keep-all", overflowWrap: "anywhere" } : {};
9252
9208
  if (keyboardVisible && hideOnKeyboard) return null;
9253
9209
  return /* @__PURE__ */ jsx55(BottomActionBarContext.Provider, { value: !wide, children: /* @__PURE__ */ jsxs42(View48, { onLayout: (event) => setWidth(event.nativeEvent.layout.width), style: {
9254
9210
  flexShrink: 0,
@@ -9267,7 +9223,7 @@ function KjunBottomActionBar({ description, children, safeAreaBottom = 0, keyboa
9267
9223
  }
9268
9224
 
9269
9225
  // packages/native/src/media.tsx
9270
- import { useRef as useRef33, useState as useState40 } from "react";
9226
+ import { useRef as useRef33, useState as useState41 } from "react";
9271
9227
  import { Image, View as View49 } from "react-native";
9272
9228
  import { tokens as tokens54 } from "@kjun-ui/tokens";
9273
9229
  import { jsx as jsx56 } from "react/jsx-runtime";
@@ -9276,7 +9232,7 @@ function KjunImage({ src, source, alt, decorative = false, aspectRatio = 1, fit
9276
9232
  const request = JSON.stringify(source != null ? source : src), current = useRef33({ request, version: 0 });
9277
9233
  if (current.current.request !== request) current.current = { request, version: current.current.version + 1 };
9278
9234
  const version = current.current.version;
9279
- const [failed, setFailed] = useState40(null);
9235
+ const [failed, setFailed] = useState41(null);
9280
9236
  const missing = !source && !src;
9281
9237
  return /* @__PURE__ */ jsx56(View49, { accessibilityElementsHidden: decorative, importantForAccessibility: decorative ? "no-hide-descendants" : "auto", "aria-hidden": decorative || void 0, style: { width: "100%", aspectRatio: aspectRatio > 0 ? aspectRatio : 1, overflow: "hidden", backgroundColor: colors.secondary }, children: !missing && failed !== version ? /* @__PURE__ */ jsx56(Image, { source: source != null ? source : { uri: src }, accessible: !decorative, accessibilityLabel: decorative ? void 0 : alt, resizeMode: fit, style: { position: "absolute", inset: 0, width: "100%", height: "100%" }, onLoad: () => {
9282
9238
  if (version === current.current.version) onLoad == null ? void 0 : onLoad();
@@ -9306,8 +9262,8 @@ function KjunChip({ label, icon, removable = false, disabled = false, size = "md
9306
9262
  }
9307
9263
 
9308
9264
  // packages/native/src/range-input.tsx
9309
- import { useEffect as useEffect26, useMemo as useMemo2, useRef as useRef34, useState as useState41 } from "react";
9310
- import { PanResponder, Platform as Platform26, Pressable as Pressable3, View as View51 } from "react-native";
9265
+ import { useEffect as useEffect26, useMemo as useMemo2, useRef as useRef34, useState as useState42 } from "react";
9266
+ import { PanResponder, Platform as Platform27, Pressable as Pressable3, View as View51 } from "react-native";
9311
9267
  import { tokens as tokens56, createSliderDomain, sliderKey } from "@kjun-ui/tokens";
9312
9268
  import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
9313
9269
  var geometry = tokens56.extensions.slider;
@@ -9330,9 +9286,9 @@ function RangeInput({
9330
9286
  const valid = domain.valid && (!Array.isArray(value) || value.length === 2) && values.every(domain.accepts) && (values.length === 1 || values[0] <= values[1]);
9331
9287
  const blocked = disabled || !valid;
9332
9288
  const effectiveMax = valid ? domain.snap(max) : min;
9333
- const [hovered, setHovered] = useState41(null);
9334
- const [dragging, setDragging] = useState41(null);
9335
- const [focused, setFocused] = useState41(null);
9289
+ const [hovered, setHovered] = useState42(null);
9290
+ const [dragging, setDragging] = useState42(null);
9291
+ const [focused, setFocused] = useState42(null);
9336
9292
  const track = useRef34(null), measured = useRef34({ x: 0, width: 1 }), selected = useRef34(0), dirty = useRef34(false);
9337
9293
  const latest = useRef34(values);
9338
9294
  latest.current = values;
@@ -9538,7 +9494,7 @@ function RangeInput({
9538
9494
  setFocused(null);
9539
9495
  commit();
9540
9496
  },
9541
- ...Platform26.OS === "web" ? {
9497
+ ...Platform27.OS === "web" ? {
9542
9498
  "aria-valuenow": number,
9543
9499
  "aria-valuemin": index === 1 ? values[0] : min,
9544
9500
  "aria-valuemax": values.length === 2 && index === 0 ? values[1] : domain.snap(max),
@@ -9562,7 +9518,7 @@ function RangeInput({
9562
9518
  alignItems: "center",
9563
9519
  justifyContent: "center",
9564
9520
  zIndex: focused === index || dragging === index ? 1 : 0,
9565
- ...Platform26.OS === "web" ? {
9521
+ ...Platform27.OS === "web" ? {
9566
9522
  outlineStyle: "solid",
9567
9523
  outlineWidth: 0,
9568
9524
  cursor: blocked ? "default" : dragging === index ? "grabbing" : "grab"
@@ -9579,7 +9535,7 @@ function RangeInput({
9579
9535
  borderWidth: tokens56.border.controlWidth,
9580
9536
  borderColor: !blocked && dragging === index ? colors.brandActive : !blocked && hovered === index ? colors.brandHover : colors.brand,
9581
9537
  backgroundColor: colors.surface,
9582
- ...Platform26.OS === "web" && !blocked && focused === index ? {
9538
+ ...Platform27.OS === "web" && !blocked && focused === index ? {
9583
9539
  outlineStyle: "solid",
9584
9540
  outlineWidth: tokens56.states.focus.width,
9585
9541
  outlineOffset: tokens56.states.focus.choiceOffset,
@@ -9606,8 +9562,8 @@ function KjunRangeSlider(props) {
9606
9562
  }
9607
9563
 
9608
9564
  // packages/native/src/quantity-stepper.tsx
9609
- import { useEffect as useEffect27, useRef as useRef35, useState as useState42 } from "react";
9610
- import { Platform as Platform27, View as View52 } from "react-native";
9565
+ import { useEffect as useEffect27, useRef as useRef35, useState as useState43 } from "react";
9566
+ import { Platform as Platform28, View as View52 } from "react-native";
9611
9567
  import { createNumberDomain, quantityKeyAction, tokens as tokens57 } from "@kjun-ui/tokens";
9612
9568
 
9613
9569
  // shared/package-runtime/component-icons.ts
@@ -9628,7 +9584,7 @@ function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, dis
9628
9584
  const increaseStyle = { ...buttonStyle, borderRadius: 0, borderTopRightRadius: outer, borderBottomRightRadius: outer };
9629
9585
  const domain = createNumberDomain({ min, max, step, precision }), valid = domain.valid && domain.accepts(value), blocked = disabled || !valid;
9630
9586
  const surface = useFieldSurface(size, { disabled: blocked, invalid });
9631
- const [draft, setDraft] = useState42(String(value));
9587
+ const [draft, setDraft] = useState43(String(value));
9632
9588
  const inputRef = useRef35(null);
9633
9589
  const composing = useRef35(false), dirty = useRef35(false), accepted = useRef35(value);
9634
9590
  const cancelledEscape = useRef35(false);
@@ -9683,7 +9639,7 @@ function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, dis
9683
9639
  setDraft(text);
9684
9640
  } };
9685
9641
  useEffect27(() => {
9686
- if (Platform27.OS !== "web") return;
9642
+ if (Platform28.OS !== "web") return;
9687
9643
  const input = inputRef.current;
9688
9644
  const keydown = (event) => handlers.current.key(event);
9689
9645
  const keyup = (event) => {
@@ -9712,7 +9668,7 @@ function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, dis
9712
9668
  };
9713
9669
  }, []);
9714
9670
  const surfaceBox = { position: "absolute", left: 0, right: 0, top: "50%", height: tokens57.input[size].height, marginTop: -tokens57.input[size].height / 2, borderRadius: surface.spec.radius };
9715
- const hug = Platform27.OS === "web" && !block ? { width: "fit-content" } : {};
9671
+ const hug = Platform28.OS === "web" && !block ? { width: "fit-content" } : {};
9716
9672
  return /* @__PURE__ */ jsx59(IconFallbacks, { icons: componentIcons, children: /* @__PURE__ */ jsxs45(View52, { style: { flexDirection: "row", alignItems: "center", alignSelf: block ? "stretch" : "flex-start", maxWidth: "100%", borderRadius: surface.spec.radius, ...hug }, children: [
9717
9673
  /* @__PURE__ */ jsx59(View52, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, backgroundColor: colors.inputBg } }),
9718
9674
  /* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(KjunButton, { size, style: decreaseStyle, variant: "ghost", ariaLabel: "\uC218\uB7C9 \uC904\uC774\uAE30", disabled: blocked || value <= min, onPress: () => move(-1), prefixIcon: "minus" }) }),
@@ -9743,8 +9699,8 @@ function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, dis
9743
9699
  surface.setFocused(false);
9744
9700
  commit();
9745
9701
  },
9746
- onSubmitEditing: Platform27.OS === "web" ? void 0 : commit,
9747
- ...Platform27.OS === "web" ? { "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-labelledby": labelledBy, "aria-describedby": field == null ? void 0 : field.describedBy, "aria-invalid": invalid || void 0, "aria-required": (field == null ? void 0 : field.required) || void 0 } : { onKeyPress: key },
9702
+ onSubmitEditing: Platform28.OS === "web" ? void 0 : commit,
9703
+ ...Platform28.OS === "web" ? { "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-labelledby": labelledBy, "aria-describedby": field == null ? void 0 : field.describedBy, "aria-invalid": invalid || void 0, "aria-required": (field == null ? void 0 : field.required) || void 0 } : { onKeyPress: key },
9748
9704
  style: { width: "100%", minWidth: 0, ...surface.style, borderRadius: 0, borderTopColor: "transparent", borderBottomColor: "transparent", borderLeftColor: "transparent", borderRightColor: "transparent", backgroundColor: !blocked && (surface.active || surface.hovered) ? colors.hover : "transparent", outlineWidth: 0, color: surface.ink, fontFamily, ...inputTypeStyle(size), textAlign: "center", paddingHorizontal: surface.spec.padding - tokens57.border.controlWidth, paddingVertical: 0 }
9749
9705
  }
9750
9706
  ) }),
@@ -9754,7 +9710,7 @@ function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, dis
9754
9710
  }
9755
9711
 
9756
9712
  // packages/native/src/time-picker.tsx
9757
- import { Fragment as Fragment20, useEffect as useEffect28, useId as useId11, useMemo as useMemo3, useRef as useRef36, useState as useState43 } from "react";
9713
+ import { Fragment as Fragment20, useEffect as useEffect28, useId as useId11, useMemo as useMemo3, useRef as useRef36, useState as useState44 } from "react";
9758
9714
  import { View as View53 } from "react-native";
9759
9715
  import { createTimeDomain, tokens as tokens58 } from "@kjun-ui/tokens";
9760
9716
  import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
@@ -9762,7 +9718,7 @@ function KjunTimePicker({ value, precision = "minute", min, max, minuteStep = 1,
9762
9718
  const geometry2 = tokens58.extensions.timePicker, spec = tokens58.input[size];
9763
9719
  const { colors } = useKjunStyles();
9764
9720
  const first = useRef36(null);
9765
- const [focused, setFocused] = useState43(false), [opened, setOpened] = useState43(null);
9721
+ const [focused, setFocused] = useState44(false), [opened, setOpened] = useState44(null);
9766
9722
  const field = useKjunField(), uid = useId11();
9767
9723
  const fieldId = (field == null ? void 0 : field.id) || `kjun-time-${uid}`;
9768
9724
  const domain = useMemo3(() => createTimeDomain({ precision, min, max, minuteStep, secondStep }), [precision, min, max, minuteStep, secondStep]), valid = domain.valid && domain.accepts(value);