@krizaka/ui 3.26.0 → 3.28.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.
Files changed (189) hide show
  1. package/README.md +1 -0
  2. package/dist/chip-link.js +4 -27
  3. package/dist/chip-link.js.map +1 -1
  4. package/dist/chip-row.d.ts +78 -0
  5. package/dist/chip-row.js +61 -0
  6. package/dist/chip-row.js.map +1 -0
  7. package/dist/chunk-BTTDIVVJ.js +33 -0
  8. package/dist/chunk-BTTDIVVJ.js.map +1 -0
  9. package/dist/{chunk-BCGJZ5PG.js → chunk-OUWPBSSL.js} +2 -2
  10. package/dist/{chunk-4DH2HW3D.js → chunk-TFJDIOFK.js} +2 -1
  11. package/dist/document-viewer.js +19 -3
  12. package/dist/document-viewer.js.map +1 -1
  13. package/dist/image-cropper.js +8 -4
  14. package/dist/image-cropper.js.map +1 -1
  15. package/dist/index.d.ts +3 -8
  16. package/dist/index.js +44 -48
  17. package/dist/index.js.map +1 -1
  18. package/dist/language-switch/server.d.ts +17 -0
  19. package/dist/language-switch/server.js +26 -0
  20. package/dist/language-switch/server.js.map +1 -0
  21. package/dist/language-switch.js +4 -2
  22. package/dist/language-switch.js.map +1 -1
  23. package/dist/native.d.ts +32 -1
  24. package/dist/native.js +344 -286
  25. package/dist/native.js.map +1 -1
  26. package/dist/nav-bar.d.ts +12 -2
  27. package/dist/nav-bar.js +10 -3
  28. package/dist/nav-bar.js.map +1 -1
  29. package/dist/site-footer.js +2 -2
  30. package/package.json +31 -7
  31. package/registry/account-menu.json +1 -1
  32. package/registry/achievement.json +1 -1
  33. package/registry/action-bar.json +1 -1
  34. package/registry/activity-feed.json +1 -1
  35. package/registry/alert.json +1 -1
  36. package/registry/app-header.json +1 -1
  37. package/registry/app-shell.json +1 -1
  38. package/registry/argument-card.json +1 -1
  39. package/registry/audio-player.json +1 -1
  40. package/registry/auth-layout.json +1 -1
  41. package/registry/avatar.json +1 -1
  42. package/registry/badge.json +1 -1
  43. package/registry/button.json +1 -1
  44. package/registry/captcha.json +1 -1
  45. package/registry/card-grid.json +1 -1
  46. package/registry/card.json +1 -1
  47. package/registry/catalogue-page.json +1 -1
  48. package/registry/changelog-page.json +1 -1
  49. package/registry/chat.json +1 -1
  50. package/registry/checkbox.json +1 -1
  51. package/registry/chip-link.json +1 -1
  52. package/registry/chip-row.json +173 -0
  53. package/registry/chip.json +1 -1
  54. package/registry/choice-grid.json +1 -1
  55. package/registry/code-block.json +1 -1
  56. package/registry/combobox.json +1 -1
  57. package/registry/command.json +1 -1
  58. package/registry/comparison-table.json +1 -1
  59. package/registry/component-page.json +1 -1
  60. package/registry/confirm-button.json +1 -1
  61. package/registry/contact-page.json +1 -1
  62. package/registry/continue-prompt.json +1 -1
  63. package/registry/countdown.json +1 -1
  64. package/registry/cover-hero.json +1 -1
  65. package/registry/cta-panel.json +1 -1
  66. package/registry/dashboard-layout.json +1 -1
  67. package/registry/data-table.json +1 -1
  68. package/registry/date-picker.json +1 -1
  69. package/registry/decision-list.json +1 -1
  70. package/registry/description-list.json +1 -1
  71. package/registry/detail-layout.json +1 -1
  72. package/registry/dialog.json +1 -1
  73. package/registry/docs-article-page.json +1 -1
  74. package/registry/docs-hub-page.json +1 -1
  75. package/registry/docs-layout.json +1 -1
  76. package/registry/docs-nav.json +1 -1
  77. package/registry/document-viewer.json +2 -2
  78. package/registry/dropdown-menu.json +1 -1
  79. package/registry/empty-state.json +1 -1
  80. package/registry/error-page.json +1 -1
  81. package/registry/examples/chip-row/audience.d.ts +4 -0
  82. package/registry/examples/chip-row/audience.js +15 -0
  83. package/registry/examples/chip-row/audience.tsx +16 -0
  84. package/registry/examples/chip-row/many.d.ts +4 -0
  85. package/registry/examples/chip-row/many.js +12 -0
  86. package/registry/examples/chip-row/many.tsx +16 -0
  87. package/registry/examples/settings-layout/native/account.d.ts +4 -0
  88. package/registry/examples/settings-layout/native/account.dark.png +0 -0
  89. package/registry/examples/settings-layout/native/account.js +22 -0
  90. package/registry/examples/settings-layout/native/account.light.png +0 -0
  91. package/registry/examples/settings-layout/native/account.tsx +18 -0
  92. package/registry/field.json +1 -1
  93. package/registry/file-upload.json +1 -1
  94. package/registry/filter-bar.json +1 -1
  95. package/registry/force-update-screen.json +1 -1
  96. package/registry/form.json +1 -1
  97. package/registry/gallery-page.json +1 -1
  98. package/registry/genui.json +1 -1
  99. package/registry/glow-card.json +1 -1
  100. package/registry/goal-gauge.json +1 -1
  101. package/registry/how-it-works-page.json +1 -1
  102. package/registry/image-cropper.json +2 -2
  103. package/registry/index.json +42 -10
  104. package/registry/iso.json +1 -1
  105. package/registry/kanban.json +1 -1
  106. package/registry/kbd.json +1 -1
  107. package/registry/landing-page.json +1 -1
  108. package/registry/landscape.json +1 -1
  109. package/registry/language-switch.json +6 -2
  110. package/registry/legal-page.json +1 -1
  111. package/registry/link-card.json +1 -1
  112. package/registry/list.json +1 -1
  113. package/registry/loader.json +1 -1
  114. package/registry/longform-page.json +1 -1
  115. package/registry/maintenance-screen.json +1 -1
  116. package/registry/map.json +2 -2
  117. package/registry/markdown.json +1 -1
  118. package/registry/marketing-layout.json +1 -1
  119. package/registry/marquee.json +1 -1
  120. package/registry/mascot-quote.json +1 -1
  121. package/registry/mascot-state.json +1 -1
  122. package/registry/mascots.json +1 -1
  123. package/registry/match-dialog.json +1 -1
  124. package/registry/media-capture.json +1 -1
  125. package/registry/media-gallery.json +1 -1
  126. package/registry/media-grid.json +1 -1
  127. package/registry/meta-row.json +1 -1
  128. package/registry/meter.json +1 -1
  129. package/registry/nav-bar.json +21 -6
  130. package/registry/number-ticker.json +1 -1
  131. package/registry/opening-hours.json +1 -1
  132. package/registry/page-header.json +1 -1
  133. package/registry/page-hero.json +1 -1
  134. package/registry/page.json +1 -1
  135. package/registry/pagination.json +1 -1
  136. package/registry/photo-grid.json +1 -1
  137. package/registry/pointer-light.json +1 -1
  138. package/registry/popover.json +1 -1
  139. package/registry/pricing-page.json +1 -1
  140. package/registry/product-page.json +1 -1
  141. package/registry/profile-card.json +1 -1
  142. package/registry/progress.json +1 -1
  143. package/registry/promise-card.json +1 -1
  144. package/registry/radio-group.json +1 -1
  145. package/registry/rail-nav.json +2 -2
  146. package/registry/recipes.json +1 -1
  147. package/registry/scroll-stage.json +1 -1
  148. package/registry/search-field.json +1 -1
  149. package/registry/section-backdrop.json +1 -1
  150. package/registry/separator.json +1 -1
  151. package/registry/service-card.json +1 -1
  152. package/registry/settings-layout.json +110 -7
  153. package/registry/showcase.json +1 -1
  154. package/registry/site-footer.json +2 -2
  155. package/registry/sites.json +1 -1
  156. package/registry/skeleton.json +1 -1
  157. package/registry/skip-link.json +1 -1
  158. package/registry/slider.json +1 -1
  159. package/registry/slot-picker.json +1 -1
  160. package/registry/slot.json +1 -1
  161. package/registry/spinner.json +1 -1
  162. package/registry/split-view.json +1 -1
  163. package/registry/stage-banner.json +1 -1
  164. package/registry/stat.json +1 -1
  165. package/registry/status-page.json +1 -1
  166. package/registry/step-progress.json +1 -1
  167. package/registry/step-showcase.json +1 -1
  168. package/registry/stepper.json +1 -1
  169. package/registry/sticky-action.json +1 -1
  170. package/registry/swipe-deck.json +1 -1
  171. package/registry/switch.json +1 -1
  172. package/registry/tabs.json +1 -1
  173. package/registry/tag-input.json +1 -1
  174. package/registry/tag-selector.json +1 -1
  175. package/registry/terminal-replay.json +1 -1
  176. package/registry/theme.json +1 -1
  177. package/registry/toast.json +1 -1
  178. package/registry/toc.json +1 -1
  179. package/registry/tooltip.json +1 -1
  180. package/registry/tree-view.json +1 -1
  181. package/registry/update-prompt.json +1 -1
  182. package/registry/verified-badge.json +1 -1
  183. package/registry/vertical-video.json +1 -1
  184. package/registry/video-player.json +1 -1
  185. package/registry/video-trimmer.json +1 -1
  186. package/registry/virtual.json +1 -1
  187. package/registry/waveform.json +1 -1
  188. /package/dist/{chunk-BCGJZ5PG.js.map → chunk-OUWPBSSL.js.map} +0 -0
  189. /package/dist/{chunk-4DH2HW3D.js.map → chunk-TFJDIOFK.js.map} +0 -0
package/dist/index.js CHANGED
@@ -18,63 +18,59 @@ import {
18
18
  YomizakaLogo,
19
19
  YororisLogo,
20
20
  a11y,
21
- neutral
22
- } from "./chunk-4DH2HW3D.js";
21
+ neutral,
22
+ useIds
23
+ } from "./chunk-TFJDIOFK.js";
23
24
 
24
25
  // src/marks/wu-sama-geometry.ts
25
- var round = (n) => Math.round(n * 10) / 10;
26
- var center = 200;
27
- var radius = 150;
28
- var u = radius * Math.sqrt(3) / 2;
29
- var gap = 10;
30
- var hexagon = [
31
- [center, center - radius],
32
- [round(center + u), center - radius / 2],
33
- [round(center + u), center + radius / 2],
34
- [center, center + radius],
35
- [round(center - u), center + radius / 2],
36
- [round(center - u), center - radius / 2]
37
- ];
38
- var [T, UR, LR, B, LL, UL] = hexagon;
39
- var onEdge = (a, b, x) => [x, round(a[1] + (x - a[0]) / (b[0] - a[0]) * (b[1] - a[1]))];
40
- var pt = ([x, y]) => `${x},${y}`;
41
- var left = [onEdge(T, UL, center - gap), UL, LL, onEdge(B, LL, center - gap)];
42
- var right = [onEdge(T, UR, center + gap), UR, LR, onEdge(B, LR, center + gap)];
43
- var wPoints = [
44
- [round(center - 0.63 * u), round(center - 0.4 * radius)],
45
- [round(center - 0.37 * u), round(center + 0.55 * radius)],
46
- [center, round(center - 0.03 * radius)],
47
- [round(center + 0.37 * u), round(center + 0.55 * radius)],
48
- [round(center + 0.63 * u), round(center - 0.4 * radius)]
49
- ];
50
- var peak = wPoints[2];
26
+ import { marks } from "@krizaka/tokens/native";
51
27
  var WU_SAMA = {
52
28
  viewBox: "0 0 400 400",
53
- croppedViewBox: "34 34 332 332",
54
- center,
55
- radius,
56
- gap,
57
- hexagon,
58
- /** The two halves of the hexagon (open at the top and bottom vertices), stroked in ink. */
59
- shell: { left: `M${left.map(pt).join(" L")}`, right: `M${right.map(pt).join(" L")}`, stroke: 22 },
60
- /** The W, stroked in gold. */
61
- w: `M${wPoints.map(pt).join(" L")}`,
62
- wStroke: 26,
63
- /** The node: the family's lit node, a small diamond at the W's middle summit, in ink. */
64
- node: `M${center},${round(peak[1] - 24)} L${center + 18},${peak[1]} L${center},${round(peak[1] + 24)} L${center - 18},${peak[1]}Z`,
65
- /** One mid-tone amber, hsl(40 94% 37%): 3.3:1 on white and 5.8:1 on the dark surface. */
66
- gold: "hsl(40 94% 37%)"
29
+ croppedViewBox: "86 82 228 228",
30
+ offset: 20,
31
+ /** The shield: the Krizaka pointy-top hexagon (r 92 around 180,180), open at its upper-right edge. */
32
+ shield: "M259.7,134 L259.7,226 L180,272 L100.3,226 L100.3,134 L180,88 L212,106.5",
33
+ stroke: 22,
34
+ ink: { x1: 70, y1: 290, x2: 290, y2: 70 },
35
+ blue: { x1: 180, y1: 180, x2: 300, y2: 60, stops: marks.krizaka },
36
+ /** The vertex where the shield opens: a lit node in Krizaka blue. */
37
+ node: { cx: 259.7, cy: 134, r: 19, inner: 6 },
38
+ /** The W: five straight legs in Krizaka blue. */
39
+ w: "M132,142 L154,216 L180,166 L206,216 L228,142",
40
+ wStroke: 18,
41
+ highlight: "#dbeafe",
42
+ glow: { color: "#196df5", opacity: 0.16 },
43
+ orbit: { r: 160, dash: "8 8", width: 1.5 },
44
+ ring: { r: 134, width: 1 }
67
45
  };
68
46
 
69
47
  // src/marks/WuSamaMark.tsx
70
- import { jsx, jsxs } from "react/jsx-runtime";
48
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
71
49
  function WuSamaMark({ size = 32, title, className }) {
72
- const ink = neutral("--kz-text-primary", 92);
50
+ const id = useIds("wsm", ["ink", "blue", "glow"]);
73
51
  return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: size < 48 ? WU_SAMA.croppedViewBox : WU_SAMA.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", className, ...a11y(title), children: [
74
- /* @__PURE__ */ jsx("path", { d: WU_SAMA.shell.left, stroke: ink, strokeWidth: WU_SAMA.shell.stroke, strokeLinejoin: "miter", strokeLinecap: "butt" }),
75
- /* @__PURE__ */ jsx("path", { d: WU_SAMA.shell.right, stroke: ink, strokeWidth: WU_SAMA.shell.stroke, strokeLinejoin: "miter", strokeLinecap: "butt" }),
76
- /* @__PURE__ */ jsx("path", { d: WU_SAMA.w, stroke: WU_SAMA.gold, strokeWidth: WU_SAMA.wStroke, strokeLinejoin: "miter", strokeMiterlimit: 4, strokeLinecap: "butt" }),
77
- /* @__PURE__ */ jsx("path", { d: WU_SAMA.node, fill: ink })
52
+ /* @__PURE__ */ jsxs("defs", { children: [
53
+ /* @__PURE__ */ jsxs("linearGradient", { id: id.ink, gradientUnits: "userSpaceOnUse", x1: WU_SAMA.ink.x1, y1: WU_SAMA.ink.y1, x2: WU_SAMA.ink.x2, y2: WU_SAMA.ink.y2, children: [
54
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: neutral("--kz-text-secondary", 60) }),
55
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: neutral("--kz-text-primary", 92) })
56
+ ] }),
57
+ /* @__PURE__ */ jsx("linearGradient", { id: id.blue, gradientUnits: "userSpaceOnUse", x1: WU_SAMA.blue.x1, y1: WU_SAMA.blue.y1, x2: WU_SAMA.blue.x2, y2: WU_SAMA.blue.y2, children: WU_SAMA.blue.stops.map(([offset, color]) => /* @__PURE__ */ jsx("stop", { offset, stopColor: color }, offset)) }),
58
+ /* @__PURE__ */ jsxs("radialGradient", { id: id.glow, cx: "50%", cy: "50%", r: "50%", children: [
59
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: WU_SAMA.glow.color, stopOpacity: WU_SAMA.glow.opacity }),
60
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: WU_SAMA.glow.color, stopOpacity: "0" })
61
+ ] })
62
+ ] }),
63
+ size >= 48 ? /* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: "190", fill: `url(#${id.glow})` }) : null,
64
+ size >= 48 ? /* @__PURE__ */ jsxs(Fragment, { children: [
65
+ /* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: WU_SAMA.orbit.r, stroke: neutral("--kz-border-strong", 40), strokeWidth: WU_SAMA.orbit.width, strokeDasharray: WU_SAMA.orbit.dash, opacity: ".6" }),
66
+ /* @__PURE__ */ jsx("circle", { cx: "200", cy: "200", r: WU_SAMA.ring.r, stroke: neutral("--kz-border-default", 30), strokeWidth: WU_SAMA.ring.width, opacity: ".35" })
67
+ ] }) : null,
68
+ /* @__PURE__ */ jsxs("g", { transform: `translate(${WU_SAMA.offset} ${WU_SAMA.offset})`, children: [
69
+ /* @__PURE__ */ jsx("path", { d: WU_SAMA.shield, stroke: `url(#${id.ink})`, strokeWidth: WU_SAMA.stroke, strokeLinecap: "round", strokeLinejoin: "round" }),
70
+ /* @__PURE__ */ jsx("circle", { cx: WU_SAMA.node.cx, cy: WU_SAMA.node.cy, r: WU_SAMA.node.r, fill: `url(#${id.blue})` }),
71
+ /* @__PURE__ */ jsx("circle", { cx: WU_SAMA.node.cx, cy: WU_SAMA.node.cy, r: WU_SAMA.node.inner, fill: WU_SAMA.highlight }),
72
+ /* @__PURE__ */ jsx("path", { d: WU_SAMA.w, stroke: `url(#${id.blue})`, strokeWidth: WU_SAMA.wStroke, strokeLinecap: "round", strokeLinejoin: "round" })
73
+ ] })
78
74
  ] });
79
75
  }
80
76
  export {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/marks/wu-sama-geometry.ts","../src/marks/WuSamaMark.tsx"],"sourcesContent":["/**\n * The Wu-sama mark's geometry — the founder's byline mark. **Original mark, inspired by, not derived from**: it is the\n * Krizaka hexagon (a pointy-top regular hexagon in the 400×400 frame of the family), split at its top and bottom\n * vertices into two halves like the Krizaka shield that opens at one vertex, around a W of five straight legs whose\n * points are measured on that hexagon (`u`, its half-width, and `radius`) — see `wu-sama-geometry` tests. It is not\n * the Wu-Tang Clan's mark: no bat-wing silhouette, no curve, no black-and-yellow composition. The gold is one fixed\n * mid-tone amber (≥ 3:1 on the page surfaces of both themes), a hip-hop nod and not that clan's yellow.\n */\nconst round = (n: number) => Math.round(n * 10) / 10;\nconst center = 200;\nconst radius = 150;\n/** Half the hexagon's width. */\nconst u = (radius * Math.sqrt(3)) / 2;\nconst gap = 10;\n\n/** T, UR, LR, B, LL, UL. */\nconst hexagon = [\n [center, center - radius],\n [round(center + u), center - radius / 2],\n [round(center + u), center + radius / 2],\n [center, center + radius],\n [round(center - u), center + radius / 2],\n [round(center - u), center - radius / 2],\n] as const;\nconst [T, UR, LR, B, LL, UL] = hexagon;\n\n/** The point of the edge a→b whose x is `x`. */\nconst onEdge = (a: readonly [number, number], b: readonly [number, number], x: number) => [x, round(a[1] + ((x - a[0]) / (b[0] - a[0])) * (b[1] - a[1]))] as const;\nconst pt = ([x, y]: readonly [number, number]) => `${x},${y}`;\n\nconst left = [onEdge(T, UL, center - gap), UL, LL, onEdge(B, LL, center - gap)] as const;\nconst right = [onEdge(T, UR, center + gap), UR, LR, onEdge(B, LR, center + gap)] as const;\n\n/** The W: tips and valleys at fixed fractions of the hexagon's half-width and radius; the middle summit on the axis. */\nconst wPoints = [\n [round(center - 0.63 * u), round(center - 0.4 * radius)],\n [round(center - 0.37 * u), round(center + 0.55 * radius)],\n [center, round(center - 0.03 * radius)],\n [round(center + 0.37 * u), round(center + 0.55 * radius)],\n [round(center + 0.63 * u), round(center - 0.4 * radius)],\n] as const;\nconst peak = wPoints[2];\n\nexport const WU_SAMA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"34 34 332 332\",\n center,\n radius,\n gap,\n hexagon,\n /** The two halves of the hexagon (open at the top and bottom vertices), stroked in ink. */\n shell: { left: `M${left.map(pt).join(\" L\")}`, right: `M${right.map(pt).join(\" L\")}`, stroke: 22 },\n /** The W, stroked in gold. */\n w: `M${wPoints.map(pt).join(\" L\")}`,\n wStroke: 26,\n /** The node: the family's lit node, a small diamond at the W's middle summit, in ink. */\n node: `M${center},${round(peak[1] - 24)} L${center + 18},${peak[1]} L${center},${round(peak[1] + 24)} L${center - 18},${peak[1]}Z`,\n /** One mid-tone amber, hsl(40 94% 37%): 3.3:1 on white and 5.8:1 on the dark surface. */\n gold: \"hsl(40 94% 37%)\",\n} as const;\n","import { a11y, type MarkProps, neutral } from \"./shared\";\nimport { WU_SAMA as G } from \"./wu-sama-geometry\";\n\n/**\n * The Wu-sama mark — the founder's byline mark, for the person and not the company (the company keeps\n * `KrizakaLogo`). Oussama's nickname is Wu-sama: a W of five straight legs in gold inside the Krizaka hexagon, split\n * at its top and bottom vertices, a small lit node at the middle summit. Still: no orbit, no pulse. The hexagon and the\n * node read the host's text role, so they are ink in both themes; the gold is one mid-tone amber that reads on both.\n *\n * **Original mark, inspired by, not derived from**: it nods to the culture its name comes from but is built from the\n * Krizaka hexagon's own measures (see `wu-sama-geometry.ts` and its tests), never from the Wu-Tang Clan's registered\n * logo — no bat-wing W, no curve, no yellow-on-black copy. Below 48 px it crops to the emblem.\n */\nexport function WuSamaMark({ size = 32, title, className }: Omit<MarkProps, \"animated\"> & { animated?: boolean }) {\n const ink = neutral(\"--kz-text-primary\", 92);\n return (\n <svg width={size} height={size} viewBox={size < 48 ? G.croppedViewBox : G.viewBox} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <path d={G.shell.left} stroke={ink} strokeWidth={G.shell.stroke} strokeLinejoin=\"miter\" strokeLinecap=\"butt\" />\n <path d={G.shell.right} stroke={ink} strokeWidth={G.shell.stroke} strokeLinejoin=\"miter\" strokeLinecap=\"butt\" />\n <path d={G.w} stroke={G.gold} strokeWidth={G.wStroke} strokeLinejoin=\"miter\" strokeMiterlimit={4} strokeLinecap=\"butt\" />\n <path d={G.node} fill={ink} />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAM,QAAQ,CAAC,MAAc,KAAK,MAAM,IAAI,EAAE,IAAI;AAClD,IAAM,SAAS;AACf,IAAM,SAAS;AAEf,IAAM,IAAK,SAAS,KAAK,KAAK,CAAC,IAA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QAAE,MAAM,aAAa,QAAE,SAAS,gBAAe,SAAQ,kBAAkB,GAAG,eAAc,QAAO;AAAA,IACvH,oBAAC,UAAK,GAAG,QAAE,MAAM,MAAM,KAAK;AAAA,KAC9B;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/marks/wu-sama-geometry.ts","../src/marks/WuSamaMark.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The Wu-sama mark's geometry — the founder's byline mark.\n * It shares the Krizaka shield contour (pointy-top hexagonal shield with open vertex and lit node)\n * and brand colors, holding a W of five straight legs in Krizaka blue at its center.\n */\nexport const WU_SAMA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"86 82 228 228\",\n offset: 20,\n /** The shield: the Krizaka pointy-top hexagon (r 92 around 180,180), open at its upper-right edge. */\n shield: \"M259.7,134 L259.7,226 L180,272 L100.3,226 L100.3,134 L180,88 L212,106.5\",\n stroke: 22,\n ink: { x1: 70, y1: 290, x2: 290, y2: 70 },\n blue: { x1: 180, y1: 180, x2: 300, y2: 60, stops: marks.krizaka },\n /** The vertex where the shield opens: a lit node in Krizaka blue. */\n node: { cx: 259.7, cy: 134, r: 19, inner: 6 },\n /** The W: five straight legs in Krizaka blue. */\n w: \"M132,142 L154,216 L180,166 L206,216 L228,142\",\n wStroke: 18,\n highlight: \"#dbeafe\",\n glow: { color: \"#196df5\", opacity: 0.16 },\n orbit: { r: 160, dash: \"8 8\", width: 1.5 },\n ring: { r: 134, width: 1 },\n} as const;\n","import { a11y, type MarkProps, neutral, useIds } from \"./shared\";\nimport { WU_SAMA as G } from \"./wu-sama-geometry\";\n\n/**\n * The Wu-sama mark — the founder's byline mark, for the person and not the company (the company keeps `KrizakaLogo`).\n * Oussama's nickname is Wu-sama: it shares Krizaka's hexagonal shield contour and color palette (ink shield, open\n * vertex with lit blue node), with the W rendered in Krizaka blue at the center. Below 48 px it crops to the emblem.\n */\nexport function WuSamaMark({ size = 32, title, className }: Omit<MarkProps, \"animated\"> & { animated?: boolean }) {\n const id = useIds(\"wsm\", [\"ink\", \"blue\", \"glow\"] as const);\n return (\n <svg width={size} height={size} viewBox={size < 48 ? G.croppedViewBox : G.viewBox} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <defs>\n <linearGradient id={id.ink} gradientUnits=\"userSpaceOnUse\" x1={G.ink.x1} y1={G.ink.y1} x2={G.ink.x2} y2={G.ink.y2}>\n <stop offset=\"0%\" stopColor={neutral(\"--kz-text-secondary\", 60)} />\n <stop offset=\"100%\" stopColor={neutral(\"--kz-text-primary\", 92)} />\n </linearGradient>\n <linearGradient id={id.blue} gradientUnits=\"userSpaceOnUse\" x1={G.blue.x1} y1={G.blue.y1} x2={G.blue.x2} y2={G.blue.y2}>\n {G.blue.stops.map(([offset, color]) => (\n <stop key={offset} offset={offset} stopColor={color} />\n ))}\n </linearGradient>\n <radialGradient id={id.glow} cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" stopColor={G.glow.color} stopOpacity={G.glow.opacity} />\n <stop offset=\"100%\" stopColor={G.glow.color} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n {size >= 48 ? <circle cx=\"200\" cy=\"200\" r=\"190\" fill={`url(#${id.glow})`} /> : null}\n {size >= 48 ? (\n <>\n <circle cx=\"200\" cy=\"200\" r={G.orbit.r} stroke={neutral(\"--kz-border-strong\", 40)} strokeWidth={G.orbit.width} strokeDasharray={G.orbit.dash} opacity=\".6\" />\n <circle cx=\"200\" cy=\"200\" r={G.ring.r} stroke={neutral(\"--kz-border-default\", 30)} strokeWidth={G.ring.width} opacity=\".35\" />\n </>\n ) : null}\n <g transform={`translate(${G.offset} ${G.offset})`}>\n <path d={G.shield} stroke={`url(#${id.ink})`} strokeWidth={G.stroke} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <circle cx={G.node.cx} cy={G.node.cy} r={G.node.r} fill={`url(#${id.blue})`} />\n <circle cx={G.node.cx} cy={G.node.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AK,GAAG,QAAE,QAAQ,QAAQ,QAAQ,GAAG,GAAG,KAAK,aAAa,QAAE,QAAQ,eAAc,SAAQ,gBAAe,SAAQ;AAAA,MAClH,oBAAC,YAAO,IAAI,QAAE,KAAK,IAAI,IAAI,QAAE,KAAK,IAAI,GAAG,QAAE,KAAK,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK;AAAA,MAC7E,oBAAC,YAAO,IAAI,QAAE,KAAK,IAAI,IAAI,QAAE,KAAK,IAAI,GAAG,QAAE,KAAK,OAAO,MAAM,QAAE,WAAW;AAAA,MAC1E,oBAAC,UAAK,GAAG,QAAE,GAAG,QAAQ,QAAQ,GAAG,IAAI,KAAK,aAAa,QAAE,SAAS,eAAc,SAAQ,gBAAe,SAAQ;AAAA,OACjH;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,17 @@
1
+ /** A language the site speaks: its code (`fr`), its name in its own language (`Français`) and the address of the page in it. */
2
+ interface Language {
3
+ code: string;
4
+ name: string;
5
+ href: string;
6
+ }
7
+ /** The languages of the family, each named in its own language — the switch never shows “French” to a French reader. */
8
+ declare const languageNames: Readonly<Record<string, string>>;
9
+ /**
10
+ * The same page in another language: `/fr/baux?x=1#a` → `/en/baux?x=1#a`. The first segment is the language when it is
11
+ * one of `locales`; an address without a language prefix gets one. Query and hash are kept.
12
+ */
13
+ declare function languageHref(path: string, to: string, locales?: readonly string[]): string;
14
+ /** The `languages` of a switch for the page at `path`, in the order of `locales`, each named in its own language. */
15
+ declare function languagesFor(path: string, locales?: readonly string[]): Language[];
16
+
17
+ export { type Language, languageHref, languageNames, languagesFor };
@@ -0,0 +1,26 @@
1
+ // src/language-switch/href.ts
2
+ var languageNames = {
3
+ en: "English",
4
+ fr: "Fran\xE7ais",
5
+ es: "Espa\xF1ol",
6
+ de: "Deutsch",
7
+ it: "Italiano",
8
+ pt: "Portugu\xEAs"
9
+ };
10
+ function languageHref(path, to, locales = ["en", "fr"]) {
11
+ const splitIndex = path.search(/[?#]/);
12
+ const pathname = splitIndex === -1 ? path : path.slice(0, splitIndex);
13
+ const rest = splitIndex === -1 ? "" : path.slice(splitIndex);
14
+ const segments = (pathname || "/").split("/").filter(Boolean);
15
+ if (segments[0] && locales.includes(segments[0])) segments.shift();
16
+ return `/${[to, ...segments].join("/")}${rest}`;
17
+ }
18
+ function languagesFor(path, locales = ["en", "fr"]) {
19
+ return locales.map((code) => ({ code, name: languageNames[code] ?? code.toUpperCase(), href: languageHref(path, code, locales) }));
20
+ }
21
+ export {
22
+ languageHref,
23
+ languageNames,
24
+ languagesFor
25
+ };
26
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/language-switch/href.ts"],"sourcesContent":["/** A language the site speaks: its code (`fr`), its name in its own language (`Français`) and the address of the page in it. */\nexport interface Language {\n code: string;\n name: string;\n href: string;\n}\n\n/** The languages of the family, each named in its own language — the switch never shows “French” to a French reader. */\nexport const languageNames: Readonly<Record<string, string>> = {\n en: \"English\",\n fr: \"Français\",\n es: \"Español\",\n de: \"Deutsch\",\n it: \"Italiano\",\n pt: \"Português\",\n};\n\n/**\n * The same page in another language: `/fr/baux?x=1#a` → `/en/baux?x=1#a`. The first segment is the language when it is\n * one of `locales`; an address without a language prefix gets one. Query and hash are kept.\n */\nexport function languageHref(path: string, to: string, locales: readonly string[] = [\"en\", \"fr\"]): string {\n const splitIndex = path.search(/[?#]/);\n const pathname = splitIndex === -1 ? path : path.slice(0, splitIndex);\n const rest = splitIndex === -1 ? \"\" : path.slice(splitIndex);\n const segments = (pathname || \"/\").split(\"/\").filter(Boolean);\n if (segments[0] && locales.includes(segments[0])) segments.shift();\n return `/${[to, ...segments].join(\"/\")}${rest}`;\n}\n\n/** The `languages` of a switch for the page at `path`, in the order of `locales`, each named in its own language. */\nexport function languagesFor(path: string, locales: readonly string[] = [\"en\", \"fr\"]): Language[] {\n return locales.map((code) => ({ code, name: languageNames[code] ?? code.toUpperCase(), href: languageHref(path, code, locales) }));\n}\n"],"mappings":";AAQO,IAAM,gBAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAMO,SAAS,aAAa,MAAc,IAAY,UAA6B,CAAC,MAAM,IAAI,GAAW;AACxG,QAAM,aAAa,KAAK,OAAO,MAAM;AACrC,QAAM,WAAW,eAAe,KAAK,OAAO,KAAK,MAAM,GAAG,UAAU;AACpE,QAAM,OAAO,eAAe,KAAK,KAAK,KAAK,MAAM,UAAU;AAC3D,QAAM,YAAY,YAAY,KAAK,MAAM,GAAG,EAAE,OAAO,OAAO;AAC5D,MAAI,SAAS,CAAC,KAAK,QAAQ,SAAS,SAAS,CAAC,CAAC,EAAG,UAAS,MAAM;AACjE,SAAO,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,CAAC,GAAG,IAAI;AAC/C;AAGO,SAAS,aAAa,MAAc,UAA6B,CAAC,MAAM,IAAI,GAAe;AAChG,SAAO,QAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,MAAM,cAAc,IAAI,KAAK,KAAK,YAAY,GAAG,MAAM,aAAa,MAAM,MAAM,OAAO,EAAE,EAAE;AACnI;","names":[]}
@@ -14,8 +14,10 @@ var languageNames = {
14
14
  pt: "Portugu\xEAs"
15
15
  };
16
16
  function languageHref(path, to, locales = ["en", "fr"]) {
17
- const [, pathname = "/", rest = ""] = /^([^?#]*)(.*)$/.exec(path) ?? [];
18
- const segments = pathname.split("/").filter(Boolean);
17
+ const splitIndex = path.search(/[?#]/);
18
+ const pathname = splitIndex === -1 ? path : path.slice(0, splitIndex);
19
+ const rest = splitIndex === -1 ? "" : path.slice(splitIndex);
20
+ const segments = (pathname || "/").split("/").filter(Boolean);
19
21
  if (segments[0] && locales.includes(segments[0])) segments.shift();
20
22
  return `/${[to, ...segments].join("/")}${rest}`;
21
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/language-switch/href.ts"],"sourcesContent":["/** A language the site speaks: its code (`fr`), its name in its own language (`Français`) and the address of the page in it. */\nexport interface Language {\n code: string;\n name: string;\n href: string;\n}\n\n/** The languages of the family, each named in its own language — the switch never shows “French” to a French reader. */\nexport const languageNames: Readonly<Record<string, string>> = {\n en: \"English\",\n fr: \"Français\",\n es: \"Español\",\n de: \"Deutsch\",\n it: \"Italiano\",\n pt: \"Português\",\n};\n\n/**\n * The same page in another language: `/fr/baux?x=1#a` → `/en/baux?x=1#a`. The first segment is the language when it is\n * one of `locales`; an address without a language prefix gets one. Query and hash are kept.\n */\nexport function languageHref(path: string, to: string, locales: readonly string[] = [\"en\", \"fr\"]): string {\n const [, pathname = \"/\", rest = \"\"] = /^([^?#]*)(.*)$/.exec(path) ?? [];\n const segments = pathname.split(\"/\").filter(Boolean);\n if (segments[0] && locales.includes(segments[0])) segments.shift();\n return `/${[to, ...segments].join(\"/\")}${rest}`;\n}\n\n/** The `languages` of a switch for the page at `path`, in the order of `locales`, each named in its own language. */\nexport function languagesFor(path: string, locales: readonly string[] = [\"en\", \"fr\"]): Language[] {\n return locales.map((code) => ({ code, name: languageNames[code] ?? code.toUpperCase(), href: languageHref(path, code, locales) }));\n}\n"],"mappings":";;;;;;;AAQO,IAAM,gBAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAMO,SAAS,aAAa,MAAc,IAAY,UAA6B,CAAC,MAAM,IAAI,GAAW;AACxG,QAAM,CAAC,EAAE,WAAW,KAAK,OAAO,EAAE,IAAI,iBAAiB,KAAK,IAAI,KAAK,CAAC;AACtE,QAAM,WAAW,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO;AACnD,MAAI,SAAS,CAAC,KAAK,QAAQ,SAAS,SAAS,CAAC,CAAC,EAAG,UAAS,MAAM;AACjE,SAAO,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,CAAC,GAAG,IAAI;AAC/C;AAGO,SAAS,aAAa,MAAc,UAA6B,CAAC,MAAM,IAAI,GAAe;AAChG,SAAO,QAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,MAAM,cAAc,IAAI,KAAK,KAAK,YAAY,GAAG,MAAM,aAAa,MAAM,MAAM,OAAO,EAAE,EAAE;AACnI;","names":[]}
1
+ {"version":3,"sources":["../src/language-switch/href.ts"],"sourcesContent":["/** A language the site speaks: its code (`fr`), its name in its own language (`Français`) and the address of the page in it. */\nexport interface Language {\n code: string;\n name: string;\n href: string;\n}\n\n/** The languages of the family, each named in its own language — the switch never shows “French” to a French reader. */\nexport const languageNames: Readonly<Record<string, string>> = {\n en: \"English\",\n fr: \"Français\",\n es: \"Español\",\n de: \"Deutsch\",\n it: \"Italiano\",\n pt: \"Português\",\n};\n\n/**\n * The same page in another language: `/fr/baux?x=1#a` → `/en/baux?x=1#a`. The first segment is the language when it is\n * one of `locales`; an address without a language prefix gets one. Query and hash are kept.\n */\nexport function languageHref(path: string, to: string, locales: readonly string[] = [\"en\", \"fr\"]): string {\n const splitIndex = path.search(/[?#]/);\n const pathname = splitIndex === -1 ? path : path.slice(0, splitIndex);\n const rest = splitIndex === -1 ? \"\" : path.slice(splitIndex);\n const segments = (pathname || \"/\").split(\"/\").filter(Boolean);\n if (segments[0] && locales.includes(segments[0])) segments.shift();\n return `/${[to, ...segments].join(\"/\")}${rest}`;\n}\n\n/** The `languages` of a switch for the page at `path`, in the order of `locales`, each named in its own language. */\nexport function languagesFor(path: string, locales: readonly string[] = [\"en\", \"fr\"]): Language[] {\n return locales.map((code) => ({ code, name: languageNames[code] ?? code.toUpperCase(), href: languageHref(path, code, locales) }));\n}\n"],"mappings":";;;;;;;AAQO,IAAM,gBAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAMO,SAAS,aAAa,MAAc,IAAY,UAA6B,CAAC,MAAM,IAAI,GAAW;AACxG,QAAM,aAAa,KAAK,OAAO,MAAM;AACrC,QAAM,WAAW,eAAe,KAAK,OAAO,KAAK,MAAM,GAAG,UAAU;AACpE,QAAM,OAAO,eAAe,KAAK,KAAK,KAAK,MAAM,UAAU;AAC3D,QAAM,YAAY,YAAY,KAAK,MAAM,GAAG,EAAE,OAAO,OAAO;AAC5D,MAAI,SAAS,CAAC,KAAK,QAAQ,SAAS,SAAS,CAAC,CAAC,EAAG,UAAS,MAAM;AACjE,SAAO,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,CAAC,GAAG,IAAI;AAC/C;AAGO,SAAS,aAAa,MAAc,UAA6B,CAAC,MAAM,IAAI,GAAe;AAChG,SAAO,QAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,MAAM,cAAc,IAAI,KAAK,KAAK,YAAY,GAAG,MAAM,aAAa,MAAM,MAAM,OAAO,EAAE,EAAE;AACnI;","names":[]}
package/dist/native.d.ts CHANGED
@@ -1760,6 +1760,37 @@ type SegmentedProps<T extends string> = {
1760
1760
  */
1761
1761
  declare function Segmented<T extends string>({ options, value, onValueChange, size, "aria-label": label, style }: SegmentedProps<T>): React$1.JSX.Element;
1762
1762
 
1763
+ type SettingsRowProps = {
1764
+ /** What the setting is ("Username"), passed translated. */
1765
+ label: string;
1766
+ /** One line of help under the label. */
1767
+ description?: string;
1768
+ /** An icon (24 pt) drawn in a tile before the label. */
1769
+ icon?: React$1.ReactNode;
1770
+ /** The current value on the right ("English", "Dark"). */
1771
+ value?: string;
1772
+ /** A control on the right (a `Switch`): the row is then not pressable by itself. */
1773
+ trailing?: React$1.ReactNode;
1774
+ /** Makes the row a button that opens something; a chevron is shown. */
1775
+ onPress?: () => void;
1776
+ /** Tints the label as dangerous ("Delete account"). */
1777
+ destructive?: boolean;
1778
+ /** The row's accessible name when the visible words do not say it all; by default the visible words (label, help, value) are read. */
1779
+ accessibilityLabel?: string;
1780
+ /** Not available: dimmed and not pressable. */
1781
+ disabled?: boolean;
1782
+ };
1783
+ /** One setting: its label and help on the left, its value or control on the right; a button when `onPress` is given. */
1784
+ declare function SettingsRow({ label, description, icon, value, trailing, onPress, destructive, accessibilityLabel, disabled }: SettingsRowProps): React$1.JSX.Element;
1785
+ type SettingsGroupProps = ViewProps & {
1786
+ /** The group's title ("Account"), passed translated; a heading for screen readers. */
1787
+ title?: string;
1788
+ /** The rows (`SettingsRow`). */
1789
+ children: React$1.ReactNode;
1790
+ };
1791
+ /** A titled card of `SettingsRow`s, divided by hairlines. */
1792
+ declare function SettingsGroup({ title, children, style, ...props }: SettingsGroupProps): React$1.JSX.Element;
1793
+
1763
1794
  type ShowcaseLabels = {
1764
1795
  /** The previous button's name. */
1765
1796
  previous: string;
@@ -2498,4 +2529,4 @@ declare function YomizakaMark({ size, animated, title, neutral }: NativeMarkProp
2498
2529
  */
2499
2530
  declare function YororisMark({ size, animated, title, neutral }: NativeMarkProps): React__default.JSX.Element;
2500
2531
 
2501
- export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };
2532
+ export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SettingsGroup, type SettingsGroupProps, SettingsRow, type SettingsRowProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };