@starci/grammar 0.3.0 → 0.4.2

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 (250) hide show
  1. package/README.md +74 -39
  2. package/dist/common/conformance.d.ts +31 -0
  3. package/dist/common/conformance.d.ts.map +1 -0
  4. package/dist/common/conformance.js +33 -0
  5. package/dist/common/conformance.js.map +1 -0
  6. package/dist/common/index.d.ts +5 -5
  7. package/dist/common/index.d.ts.map +1 -1
  8. package/dist/common/index.js +5 -10
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/common/registry.d.ts +79 -0
  11. package/dist/common/registry.d.ts.map +1 -0
  12. package/dist/common/registry.js +34 -0
  13. package/dist/common/registry.js.map +1 -0
  14. package/dist/common/renderers.d.ts +41 -0
  15. package/dist/common/renderers.d.ts.map +1 -0
  16. package/dist/common/renderers.js +44 -0
  17. package/dist/common/renderers.js.map +1 -0
  18. package/dist/common/rule-catalog.generated.d.ts +40 -0
  19. package/dist/common/rule-catalog.generated.d.ts.map +1 -0
  20. package/dist/common/rule-catalog.generated.js +230 -0
  21. package/dist/common/rule-catalog.generated.js.map +1 -0
  22. package/dist/common/spacing.d.ts +20 -0
  23. package/dist/common/spacing.d.ts.map +1 -0
  24. package/dist/common/spacing.js +18 -0
  25. package/dist/common/spacing.js.map +1 -0
  26. package/dist/common/state.d.ts +6 -0
  27. package/dist/common/state.d.ts.map +1 -0
  28. package/dist/common/state.js +11 -0
  29. package/dist/common/state.js.map +1 -0
  30. package/dist/common/styles.css +1566 -2
  31. package/dist/core/OtpInput.d.ts.map +1 -1
  32. package/dist/core/OtpInput.js +2 -1
  33. package/dist/core/OtpInput.js.map +1 -1
  34. package/dist/core/branch/MarkdownArticle/index.d.ts.map +1 -1
  35. package/dist/core/branch/MarkdownArticle/index.js +2 -2
  36. package/dist/core/branch/MarkdownArticle/index.js.map +1 -1
  37. package/dist/core/branch/Rail/classNames.d.ts.map +1 -1
  38. package/dist/core/branch/Rail/classNames.js +4 -4
  39. package/dist/core/branch/Rail/classNames.js.map +1 -1
  40. package/dist/core/branch/Rail/index.d.ts +4 -0
  41. package/dist/core/branch/Rail/index.d.ts.map +1 -1
  42. package/dist/core/branch/Rail/index.js +12 -2
  43. package/dist/core/branch/Rail/index.js.map +1 -1
  44. package/dist/core/branch/Subnav/classNames.d.ts +8 -0
  45. package/dist/core/branch/Subnav/classNames.d.ts.map +1 -0
  46. package/dist/core/branch/Subnav/classNames.js +9 -0
  47. package/dist/core/branch/Subnav/classNames.js.map +1 -0
  48. package/dist/core/branch/Subnav/index.d.ts +17 -0
  49. package/dist/core/branch/Subnav/index.d.ts.map +1 -0
  50. package/dist/core/branch/Subnav/index.js +6 -0
  51. package/dist/core/branch/Subnav/index.js.map +1 -0
  52. package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts +6 -2
  53. package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts.map +1 -1
  54. package/dist/core/branch/SurfaceAccordionCard/classNames.js +14 -9
  55. package/dist/core/branch/SurfaceAccordionCard/classNames.js.map +1 -1
  56. package/dist/core/branch/SurfaceAccordionCard/index.d.ts +8 -1
  57. package/dist/core/branch/SurfaceAccordionCard/index.d.ts.map +1 -1
  58. package/dist/core/branch/SurfaceAccordionCard/index.js +29 -11
  59. package/dist/core/branch/SurfaceAccordionCard/index.js.map +1 -1
  60. package/dist/core/branch/SurfaceCard/classNames.d.ts +11 -1
  61. package/dist/core/branch/SurfaceCard/classNames.d.ts.map +1 -1
  62. package/dist/core/branch/SurfaceCard/classNames.js +16 -7
  63. package/dist/core/branch/SurfaceCard/classNames.js.map +1 -1
  64. package/dist/core/branch/SurfaceCard/index.d.ts +11 -1
  65. package/dist/core/branch/SurfaceCard/index.d.ts.map +1 -1
  66. package/dist/core/branch/SurfaceCard/index.js +15 -4
  67. package/dist/core/branch/SurfaceCard/index.js.map +1 -1
  68. package/dist/core/branch/SurfaceListCard/classNames.d.ts +2 -0
  69. package/dist/core/branch/SurfaceListCard/classNames.d.ts.map +1 -1
  70. package/dist/core/branch/SurfaceListCard/classNames.js +7 -5
  71. package/dist/core/branch/SurfaceListCard/classNames.js.map +1 -1
  72. package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
  73. package/dist/core/branch/SurfaceListCard/index.js +3 -2
  74. package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
  75. package/dist/core/branch/Tabs/classNames.d.ts +11 -0
  76. package/dist/core/branch/Tabs/classNames.d.ts.map +1 -0
  77. package/dist/core/branch/Tabs/classNames.js +13 -0
  78. package/dist/core/branch/Tabs/classNames.js.map +1 -0
  79. package/dist/core/branch/Tabs/index.d.ts +22 -0
  80. package/dist/core/branch/Tabs/index.d.ts.map +1 -0
  81. package/dist/core/branch/Tabs/index.js +28 -0
  82. package/dist/core/branch/Tabs/index.js.map +1 -0
  83. package/dist/core/branch/Tooltip/classNames.d.ts +3 -0
  84. package/dist/core/branch/Tooltip/classNames.d.ts.map +1 -0
  85. package/dist/core/branch/Tooltip/classNames.js +4 -0
  86. package/dist/core/branch/Tooltip/classNames.js.map +1 -0
  87. package/dist/core/branch/Tooltip/index.d.ts +18 -0
  88. package/dist/core/branch/Tooltip/index.d.ts.map +1 -0
  89. package/dist/core/branch/Tooltip/index.js +14 -0
  90. package/dist/core/branch/Tooltip/index.js.map +1 -0
  91. package/dist/core/classNames.d.ts.map +1 -1
  92. package/dist/core/classNames.js +3 -3
  93. package/dist/core/classNames.js.map +1 -1
  94. package/dist/core/composite/EmptyNotice/index.d.ts +17 -0
  95. package/dist/core/composite/EmptyNotice/index.d.ts.map +1 -0
  96. package/dist/core/composite/EmptyNotice/index.js +7 -0
  97. package/dist/core/composite/EmptyNotice/index.js.map +1 -0
  98. package/dist/core/composite/HorizontalScrollRegion/index.d.ts +2 -0
  99. package/dist/core/composite/HorizontalScrollRegion/index.d.ts.map +1 -1
  100. package/dist/core/composite/HorizontalScrollRegion/index.js +5 -2
  101. package/dist/core/composite/HorizontalScrollRegion/index.js.map +1 -1
  102. package/dist/core/composite/StaticStateRow/index.d.ts.map +1 -1
  103. package/dist/core/composite/StaticStateRow/index.js +1 -1
  104. package/dist/core/composite/StaticStateRow/index.js.map +1 -1
  105. package/dist/core/composite/VerticalScrollRegion/index.d.ts +2 -0
  106. package/dist/core/composite/VerticalScrollRegion/index.d.ts.map +1 -1
  107. package/dist/core/composite/VerticalScrollRegion/index.js +2 -2
  108. package/dist/core/composite/VerticalScrollRegion/index.js.map +1 -1
  109. package/dist/core/composition/ChatWorkspace/classNames.d.ts +30 -0
  110. package/dist/core/composition/ChatWorkspace/classNames.d.ts.map +1 -0
  111. package/dist/core/composition/ChatWorkspace/classNames.js +31 -0
  112. package/dist/core/composition/ChatWorkspace/classNames.js.map +1 -0
  113. package/dist/core/composition/ChatWorkspace/index.d.ts +48 -0
  114. package/dist/core/composition/ChatWorkspace/index.d.ts.map +1 -0
  115. package/dist/core/composition/ChatWorkspace/index.js +40 -0
  116. package/dist/core/composition/ChatWorkspace/index.js.map +1 -0
  117. package/dist/core/composition/NavigationFeatureNav/classNames.d.ts +9 -0
  118. package/dist/core/composition/NavigationFeatureNav/classNames.d.ts.map +1 -0
  119. package/dist/core/composition/NavigationFeatureNav/classNames.js +10 -0
  120. package/dist/core/composition/NavigationFeatureNav/classNames.js.map +1 -0
  121. package/dist/core/composition/NavigationFeatureNav/index.d.ts +26 -0
  122. package/dist/core/composition/NavigationFeatureNav/index.d.ts.map +1 -0
  123. package/dist/core/composition/NavigationFeatureNav/index.js +13 -0
  124. package/dist/core/composition/NavigationFeatureNav/index.js.map +1 -0
  125. package/dist/core/composition/PrimaryRailLayout/index.d.ts +14 -0
  126. package/dist/core/composition/PrimaryRailLayout/index.d.ts.map +1 -0
  127. package/dist/core/composition/PrimaryRailLayout/index.js +8 -0
  128. package/dist/core/composition/PrimaryRailLayout/index.js.map +1 -0
  129. package/dist/core/composition/Sidebar/index.d.ts +31 -0
  130. package/dist/core/composition/Sidebar/index.d.ts.map +1 -0
  131. package/dist/core/composition/Sidebar/index.js +40 -0
  132. package/dist/core/composition/Sidebar/index.js.map +1 -0
  133. package/dist/core/composition/WorkspaceShell/classNames.d.ts +11 -0
  134. package/dist/core/composition/WorkspaceShell/classNames.d.ts.map +1 -0
  135. package/dist/core/composition/WorkspaceShell/classNames.js +12 -0
  136. package/dist/core/composition/WorkspaceShell/classNames.js.map +1 -0
  137. package/dist/core/composition/WorkspaceShell/index.d.ts +67 -0
  138. package/dist/core/composition/WorkspaceShell/index.d.ts.map +1 -0
  139. package/dist/core/composition/WorkspaceShell/index.js +20 -0
  140. package/dist/core/composition/WorkspaceShell/index.js.map +1 -0
  141. package/dist/core/dna.d.ts +180 -0
  142. package/dist/core/dna.d.ts.map +1 -0
  143. package/dist/core/dna.js +175 -0
  144. package/dist/core/dna.js.map +1 -0
  145. package/dist/core/index.d.ts +59 -11
  146. package/dist/core/index.d.ts.map +1 -1
  147. package/dist/core/index.js +31 -11
  148. package/dist/core/index.js.map +1 -1
  149. package/dist/core/primitive/Badge/index.d.ts +12 -0
  150. package/dist/core/primitive/Badge/index.d.ts.map +1 -0
  151. package/dist/core/primitive/Badge/index.js +15 -0
  152. package/dist/core/primitive/Badge/index.js.map +1 -0
  153. package/dist/core/primitive/Button/index.d.ts +52 -0
  154. package/dist/core/primitive/Button/index.d.ts.map +1 -0
  155. package/dist/core/primitive/Button/index.js +26 -0
  156. package/dist/core/primitive/Button/index.js.map +1 -0
  157. package/dist/core/primitive/Divider/index.d.ts +7 -0
  158. package/dist/core/primitive/Divider/index.d.ts.map +1 -0
  159. package/dist/core/primitive/Divider/index.js +5 -0
  160. package/dist/core/primitive/Divider/index.js.map +1 -0
  161. package/dist/core/primitive/GrammarRoot/index.d.ts +10 -0
  162. package/dist/core/primitive/GrammarRoot/index.d.ts.map +1 -0
  163. package/dist/core/primitive/GrammarRoot/index.js +5 -0
  164. package/dist/core/primitive/GrammarRoot/index.js.map +1 -0
  165. package/dist/core/primitive/Heading/index.d.ts +15 -0
  166. package/dist/core/primitive/Heading/index.d.ts.map +1 -0
  167. package/dist/core/primitive/Heading/index.js +26 -0
  168. package/dist/core/primitive/Heading/index.js.map +1 -0
  169. package/dist/core/primitive/Icon/index.d.ts +31 -0
  170. package/dist/core/primitive/Icon/index.d.ts.map +1 -0
  171. package/dist/core/primitive/Icon/index.js +23 -0
  172. package/dist/core/primitive/Icon/index.js.map +1 -0
  173. package/dist/core/primitive/IconButton/index.d.ts +13 -0
  174. package/dist/core/primitive/IconButton/index.d.ts.map +1 -0
  175. package/dist/core/primitive/IconButton/index.js +9 -0
  176. package/dist/core/primitive/IconButton/index.js.map +1 -0
  177. package/dist/core/primitive/IconTile/index.d.ts +17 -0
  178. package/dist/core/primitive/IconTile/index.d.ts.map +1 -0
  179. package/dist/core/primitive/IconTile/index.js +32 -0
  180. package/dist/core/primitive/IconTile/index.js.map +1 -0
  181. package/dist/core/primitive/IncludedMark/index.d.ts +10 -0
  182. package/dist/core/primitive/IncludedMark/index.d.ts.map +1 -0
  183. package/dist/core/primitive/IncludedMark/index.js +8 -0
  184. package/dist/core/primitive/IncludedMark/index.js.map +1 -0
  185. package/dist/core/primitive/Input/index.d.ts +31 -0
  186. package/dist/core/primitive/Input/index.d.ts.map +1 -0
  187. package/dist/core/primitive/Input/index.js +27 -0
  188. package/dist/core/primitive/Input/index.js.map +1 -0
  189. package/dist/core/primitive/Label/classNames.d.ts +12 -0
  190. package/dist/core/primitive/Label/classNames.d.ts.map +1 -0
  191. package/dist/core/primitive/Label/classNames.js +13 -0
  192. package/dist/core/primitive/Label/classNames.js.map +1 -0
  193. package/dist/core/primitive/Label/index.d.ts +11 -0
  194. package/dist/core/primitive/Label/index.d.ts.map +1 -0
  195. package/dist/core/primitive/Label/index.js +14 -0
  196. package/dist/core/primitive/Label/index.js.map +1 -0
  197. package/dist/core/primitive/MediaFrame/index.d.ts +15 -0
  198. package/dist/core/primitive/MediaFrame/index.d.ts.map +1 -0
  199. package/dist/core/primitive/MediaFrame/index.js +8 -0
  200. package/dist/core/primitive/MediaFrame/index.js.map +1 -0
  201. package/dist/core/primitive/PageContainer/index.d.ts +9 -0
  202. package/dist/core/primitive/PageContainer/index.d.ts.map +1 -0
  203. package/dist/core/primitive/PageContainer/index.js +8 -0
  204. package/dist/core/primitive/PageContainer/index.js.map +1 -0
  205. package/dist/core/primitive/Progress/index.d.ts +11 -0
  206. package/dist/core/primitive/Progress/index.d.ts.map +1 -0
  207. package/dist/core/primitive/Progress/index.js +13 -0
  208. package/dist/core/primitive/Progress/index.js.map +1 -0
  209. package/dist/core/primitive/RankArtwork/index.d.ts +12 -0
  210. package/dist/core/primitive/RankArtwork/index.d.ts.map +1 -0
  211. package/dist/core/primitive/RankArtwork/index.js +14 -0
  212. package/dist/core/primitive/RankArtwork/index.js.map +1 -0
  213. package/dist/core/primitive/SectionHeader/index.d.ts +15 -0
  214. package/dist/core/primitive/SectionHeader/index.d.ts.map +1 -0
  215. package/dist/core/primitive/SectionHeader/index.js +6 -0
  216. package/dist/core/primitive/SectionHeader/index.js.map +1 -0
  217. package/dist/core/primitive/SurfaceCopyGroup/index.d.ts +7 -0
  218. package/dist/core/primitive/SurfaceCopyGroup/index.d.ts.map +1 -0
  219. package/dist/core/primitive/SurfaceCopyGroup/index.js +5 -0
  220. package/dist/core/primitive/SurfaceCopyGroup/index.js.map +1 -0
  221. package/dist/core/primitive/Text/index.d.ts +25 -0
  222. package/dist/core/primitive/Text/index.d.ts.map +1 -0
  223. package/dist/core/primitive/Text/index.js +57 -0
  224. package/dist/core/primitive/Text/index.js.map +1 -0
  225. package/dist/core/primitive/TextAction/index.d.ts +45 -0
  226. package/dist/core/primitive/TextAction/index.d.ts.map +1 -0
  227. package/dist/core/primitive/TextAction/index.js +112 -0
  228. package/dist/core/primitive/TextAction/index.js.map +1 -0
  229. package/dist/core/primitive/actionStyles.d.ts +5 -0
  230. package/dist/core/primitive/actionStyles.d.ts.map +1 -0
  231. package/dist/core/primitive/actionStyles.js +19 -0
  232. package/dist/core/primitive/actionStyles.js.map +1 -0
  233. package/dist/core/state.d.ts +2 -2
  234. package/dist/core/state.js +1 -1
  235. package/dist/core/styles.css +163 -592
  236. package/dist/heritage/index.d.ts +27 -0
  237. package/dist/heritage/index.d.ts.map +1 -0
  238. package/dist/heritage/index.js +44 -0
  239. package/dist/heritage/index.js.map +1 -0
  240. package/dist/heritage/styles.css +165 -0
  241. package/dist/offset-pop/index.d.ts +12 -0
  242. package/dist/offset-pop/index.d.ts.map +1 -0
  243. package/dist/offset-pop/index.js +41 -0
  244. package/dist/offset-pop/index.js.map +1 -0
  245. package/dist/offset-pop/styles.css +292 -393
  246. package/package.json +78 -68
  247. package/dist/core/scrollable-surfaces.spec.d.ts +0 -2
  248. package/dist/core/scrollable-surfaces.spec.d.ts.map +0 -1
  249. package/dist/core/scrollable-surfaces.spec.js +0 -37
  250. package/dist/core/scrollable-surfaces.spec.js.map +0 -1
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ProgressBar, skeletonVariants } from "@heroui/react";
3
+ const SKELETON_CLASS_NAME = skeletonVariants({ animationType: "shimmer" }).base({
4
+ className: "h-2 w-full",
5
+ });
6
+ /** Accessible, full-width completion bar with an inert initial-loading shape. */
7
+ export const Progress = ({ label, value = 0, isSkeleton = false }) => {
8
+ if (isSkeleton) {
9
+ return (_jsx("span", { "data-tier": "atom", "data-component": "Progress", "data-loading": "true", "aria-hidden": true, "data-contract": "MEASURE-2", className: SKELETON_CLASS_NAME }));
10
+ }
11
+ return (_jsx(ProgressBar, { "data-tier": "atom", "data-component": "Progress", "data-loading": "false", "aria-label": label, value: value, minValue: 0, maxValue: 100, color: "accent", size: "sm", "data-contract": "MEASURE-2", className: "w-full", children: _jsx(ProgressBar.Track, { children: _jsx(ProgressBar.Fill, {}) }) }));
12
+ };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/Progress/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAW7D,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC;IAC5E,SAAS,EAAE,YAAY;CAC1B,CAAC,CAAA;AAEF,iFAAiF;AACjF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,EAAiB,EAAE,EAAE;IAChF,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,CACH,4BACc,MAAM,oBACD,UAAU,kBACZ,MAAM,wCAIL,WAAW,EACzB,SAAS,EAAE,mBAAmB,GAChC,CACL,CAAA;IACL,CAAC;IAED,OAAO,CACH,KAAC,WAAW,iBACE,MAAM,oBACD,UAAU,kBACZ,OAAO,gBACR,KAAK,EACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,KAAK,EAAC,QAAQ,EACd,IAAI,EAAC,IAAI,mBAEK,WAAW,EACzB,SAAS,EAAC,QAAQ,YAElB,KAAC,WAAW,CAAC,KAAK,cACd,KAAC,WAAW,CAAC,IAAI,KAAG,GACJ,GACV,CACjB,CAAA;AACL,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ export type RankArtworkKind = "first" | "second" | "third" | "cup";
3
+ export type RankArtworkProps = Omit<ComponentPropsWithoutRef<"svg">, "children"> & {
4
+ readonly kind: RankArtworkKind;
5
+ readonly label?: string;
6
+ };
7
+ /**
8
+ * Semantic ranking artwork shared by every Core consumer. Consumers choose
9
+ * the ranking meaning; the Grammar owns the official Fluent Emoji Flat art.
10
+ */
11
+ export declare const RankArtwork: ({ className, kind, label, ...props }: RankArtworkProps) => import("react").JSX.Element;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/primitive/RankArtwork/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAa,MAAM,OAAO,CAAA;AAGhE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/E,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AA0CD;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,sCAAsC,gBAAgB,gCAejF,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@heroui/react";
3
+ const artworkByKind = {
4
+ first: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M18.7678 11.51L13.5478 2.93001C13.2078 2.35001 12.5978 2 11.9278 2H5.3378C3.8878 2 2.9778 3.56001 3.6878 4.82001C5.0078 7.15001 6.8678 9.14001 9.1178 10.6C9.8778 11.19 10.8178 11.51 11.7878 11.51H18.7678Z", fill: "#0074BA" }), _jsx("path", { d: "M26.6578 2H20.0678C19.3978 2 18.7878 2.35001 18.4478 2.93001L13.2278 11.51H20.2178C21.1878 11.51 22.1178 11.19 22.8878 10.6C25.1378 9.14001 26.9978 7.16001 28.3178 4.82001C29.0178 3.56001 28.1078 2 26.6578 2Z", fill: "#00A6ED" }), _jsx("path", { d: "M15.9901 29.9999C21.535 29.9999 26.0301 25.3929 26.0301 19.7099C26.0301 14.0269 21.535 9.41992 15.9901 9.41992C10.4451 9.41992 5.95007 14.0269 5.95007 19.7099C5.95007 25.3929 10.4451 29.9999 15.9901 29.9999Z", fill: "#FFB02E" }), _jsx("path", { d: "M14.0759 16.041C14.0759 15.4887 14.5236 15.041 15.0759 15.041H16C16.5523 15.041 17 15.4887 17 16.041V23C17 23.5523 16.5523 24 16 24C15.4477 24 15 23.5523 15 23V17.0382C14.4832 16.9994 14.0759 16.5678 14.0759 16.041Z", fill: "#6D4534" }), _jsx("path", { d: "M16 28.7599C13.64 28.7599 11.42 27.8199 9.76004 26.1099C8.09004 24.3999 7.17004 22.1299 7.17004 19.7099C7.17004 17.2899 8.09004 15.0199 9.76004 13.3099C13.2 9.77985 18.8 9.77985 22.25 13.3099C25.69 16.8399 25.69 22.5799 22.25 26.1099C20.57 27.8199 18.35 28.7599 16 28.7599ZM15.99 11.8899C14.04 11.8899 12.08 12.6499 10.6 14.1799C9.16004 15.6599 8.37004 17.6199 8.37004 19.7099C8.37004 21.7999 9.16004 23.7599 10.6 25.2399C12.04 26.7199 13.96 27.5299 15.99 27.5299C18.03 27.5299 19.94 26.7199 21.38 25.2399C24.35 22.1899 24.35 17.2299 21.38 14.1799C19.9 12.6499 17.95 11.8899 15.99 11.8899Z", fill: "#FCD53F" })] })),
5
+ second: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M18.7676 11.51L13.5476 2.93001C13.2076 2.35001 12.5976 2 11.9276 2H5.33762C3.88762 2 2.97762 3.56001 3.68762 4.82001C5.00762 7.15001 6.86762 9.14001 9.11762 10.6C9.87762 11.19 10.8176 11.51 11.7876 11.51H18.7676Z", fill: "#0074BA" }), _jsx("path", { d: "M26.6575 2H20.0675C19.3975 2 18.7875 2.35001 18.4475 2.93001L13.2275 11.51H20.2175C21.1875 11.51 22.1175 11.19 22.8875 10.6C25.1375 9.14001 26.9975 7.16001 28.3175 4.82001C29.0175 3.56001 28.1075 2 26.6575 2Z", fill: "#00A6ED" }), _jsx("path", { d: "M15.9599 30.0012C21.5049 30.0012 25.9999 25.3942 25.9999 19.7112C25.9999 14.0282 21.5049 9.4212 15.9599 9.4212C10.415 9.4212 5.91992 14.0282 5.91992 19.7112C5.91992 25.3942 10.415 30.0012 15.9599 30.0012Z", fill: "#BEBEBE" }), _jsx("path", { d: "M15.9599 28.7611C13.5999 28.7611 11.3799 27.8211 9.71988 26.1111C8.04988 24.4011 7.12988 22.1311 7.12988 19.7111C7.12988 17.2911 8.04988 15.0211 9.71988 13.3111C13.1599 9.78114 18.7599 9.78114 22.2099 13.3111C25.6499 16.8411 25.6499 22.5811 22.2099 26.1111C20.5299 27.8211 18.3099 28.7611 15.9599 28.7611ZM15.9499 11.8911C13.9999 11.8911 12.0399 12.6511 10.5599 14.1811C9.11988 15.6611 8.32988 17.6211 8.32988 19.7111C8.32988 21.8011 9.11988 23.7611 10.5599 25.2411C11.9999 26.7211 13.9199 27.5311 15.9499 27.5311C17.9899 27.5311 19.8999 26.7211 21.3399 25.2411C24.3099 22.1911 24.3099 17.2311 21.3399 14.1811C19.8599 12.6511 17.9099 11.8911 15.9499 11.8911Z", fill: "#E6E6E6" }), _jsx("path", { d: "M17.8376 23.95H13.8676C13.4776 23.95 13.1276 23.73 12.9576 23.37C12.7876 23.02 12.8376 22.6 13.0876 22.3L16.3876 18.25C16.6476 17.93 16.5276 17.59 16.4876 17.49C16.4376 17.37 16.2776 17.1 15.9076 17.09C15.8976 17.09 15.8776 17.09 15.8576 17.09C15.5376 17.09 15.2476 17.24 15.0576 17.5C14.7376 17.95 14.1076 18.06 13.6476 17.74C13.1876 17.42 13.0876 16.79 13.4076 16.33C13.9676 15.54 14.8776 15.07 15.8476 15.07C15.8976 15.07 15.9376 15.07 15.9776 15.07C16.9976 15.12 17.8876 15.73 18.3076 16.66C18.7376 17.62 18.5976 18.71 17.9376 19.52L15.9876 21.92H17.8276C18.3876 21.92 18.8376 22.37 18.8376 22.93C18.8376 23.49 18.3976 23.95 17.8376 23.95Z", fill: "#636363" })] })),
6
+ third: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M18.7678 11.51L13.5478 2.93001C13.2078 2.35001 12.5978 2 11.9278 2H10.2678H9.8878H5.6878H5.3378C3.8878 2 2.9778 3.56001 3.6878 4.82001C5.0078 7.15001 6.8678 9.14001 9.1178 10.6C9.8778 11.19 10.8178 11.51 11.7878 11.51H18.7678Z", fill: "#0074BA" }), _jsx("path", { d: "M26.6578 2H26.3078H22.1078H21.7278H20.0678C19.3978 2 18.7878 2.35001 18.4478 2.93001L13.2278 11.51H20.2178C21.1878 11.51 22.1178 11.19 22.8878 10.6C25.1378 9.14001 26.9978 7.16001 28.3178 4.82001C29.0178 3.56001 28.1078 2 26.6578 2Z", fill: "#00A6ED" }), _jsx("path", { d: "M15.9901 30C21.535 30 26.0301 25.393 26.0301 19.71C26.0301 14.027 21.535 9.41998 15.9901 9.41998C10.4451 9.41998 5.95007 14.027 5.95007 19.71C5.95007 25.393 10.4451 30 15.9901 30Z", fill: "#D3883E" }), _jsx("path", { d: "M16 28.7599C13.64 28.7599 11.42 27.8199 9.76004 26.1099C8.09004 24.3999 7.17004 22.1299 7.17004 19.7099C7.17004 17.2899 8.09004 15.0199 9.76004 13.3099C13.2 9.77991 18.8 9.77991 22.25 13.3099C25.69 16.8399 25.69 22.5799 22.25 26.1099C20.57 27.8199 18.35 28.7599 16 28.7599ZM15.99 11.8899C14.04 11.8899 12.08 12.6499 10.6 14.1799C9.16004 15.6599 8.37004 17.6199 8.37004 19.7099C8.37004 21.7999 9.16004 23.7599 10.6 25.2399C12.04 26.7199 13.96 27.5299 15.99 27.5299C18.03 27.5299 19.94 26.7199 21.38 25.2399C24.35 22.1899 24.35 17.2299 21.38 14.1799C19.9 12.6499 17.95 11.8899 15.99 11.8899Z", fill: "#F3AD61" }), _jsx("path", { d: "M17.4021 18.2746L18.4496 16.4644C18.6225 16.1593 18.6225 15.7932 18.4496 15.4881C18.2767 15.183 17.9513 15 17.6055 15H14.514C13.975 15 13.5377 15.4373 13.5377 15.9763C13.5377 16.5152 13.975 16.9525 14.514 16.9525H15.9174L15.1648 18.2644C15.0326 18.4271 14.9513 18.6407 14.9513 18.8644C14.9513 19.4034 15.3886 19.8407 15.9276 19.8407C16.5377 19.8407 17.036 20.339 17.036 20.9491C17.036 21.5593 16.5377 22.0576 15.9276 22.0576C15.4598 22.0576 15.0428 21.7627 14.8903 21.3254C14.7072 20.817 14.1581 20.5627 13.6496 20.7356C13.1411 20.9186 12.8767 21.4678 13.0597 21.9763C13.497 23.1865 14.6462 24 15.9276 24C17.6055 24 18.9784 22.6373 18.9784 20.9491C18.9682 19.7898 18.3377 18.7932 17.4021 18.2746Z", fill: "#402A32" })] })),
7
+ cup: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M10.5208 7.52114C10.0012 5.7093 8.1239 4.65179 6.30748 5.15196C6.27354 5.1604 6.20545 5.17748 6.14394 5.19799C3.65095 6.02898 3.45292 9.41201 5.68876 10.6483L10.6585 13.3981C11.0772 13.6298 11.6044 13.4782 11.8361 13.0595C12.0678 12.6408 11.9161 12.1135 11.4974 11.8819L6.52712 9.13168C5.54516 8.58886 5.70443 7.17631 6.68631 6.84385L6.69246 6.84216C6.70347 6.83922 6.7167 6.8359 6.73807 6.83055C6.74577 6.82863 6.75344 6.8266 6.76109 6.82446C7.66072 6.57309 8.59583 7.09488 8.85505 7.99882C8.98695 8.45881 9.46678 8.72477 9.92677 8.59286C10.3868 8.46095 10.6527 7.98112 10.5208 7.52114Z", fill: "#D3883E" }), _jsx("path", { d: "M22.4608 7.99882C22.72 7.09488 23.6552 6.57309 24.5548 6.82446C24.5624 6.8266 24.5701 6.82863 24.5778 6.83055C24.5992 6.8359 24.6124 6.83922 24.6234 6.84216L24.6296 6.84385C25.6114 7.17631 25.7704 8.58902 24.7884 9.13185L19.8184 11.8819C19.3997 12.1135 19.2481 12.6408 19.4798 13.0595C19.7115 13.4782 20.2387 13.6298 20.6574 13.3981L25.6274 10.6481C27.8633 9.41184 27.6649 6.02898 25.1719 5.19799C25.1104 5.17748 25.0423 5.1604 25.0084 5.15196C23.192 4.65179 21.3146 5.7093 20.7951 7.52114C20.6632 7.98112 20.9291 8.46095 21.3891 8.59286C21.8491 8.72477 22.3289 8.45881 22.4608 7.99882Z", fill: "#D3883E" }), _jsx("path", { d: "M17.328 17.51V13.29H13.9879V17.51C13.9879 18.25 13.658 18.96 13.088 19.43L11.168 21.03H20.1479L18.228 19.43C17.658 18.95 17.328 18.25 17.328 17.51Z", fill: "#D3883E" }), _jsx("path", { d: "M15.658 16.54C11.808 16.54 8.68799 13.42 8.68799 9.56999V2.70999C8.68799 2.31999 9.00798 2 9.39798 2H21.928C22.318 2 22.638 2.31999 22.638 2.70999V9.56999C22.638 13.42 19.518 16.54 15.658 16.54Z", fill: "#FFB02E" }), _jsx("path", { d: "M22.7923 21.03H8.19719C7.42737 21.03 6.77355 21.54 6.62592 22.25L5.01245 29.34C4.93863 29.67 5.20226 29.98 5.56081 29.98H25.4392C25.7977 29.98 26.0614 29.67 25.9876 29.34L24.3741 22.25C24.2159 21.54 23.5621 21.03 22.7923 21.03Z", fill: "#6D4534" }), _jsx("path", { d: "M18.383 23.96H12.617C12.2817 23.96 12.004 24.24 12.004 24.6V26.41C12.004 26.76 12.2721 27.05 12.617 27.05H18.383C18.7183 27.05 18.996 26.77 18.996 26.41V24.6C18.996 24.25 18.7278 23.96 18.383 23.96Z", fill: "#FFB02E" })] })),
8
+ };
9
+ /**
10
+ * Semantic ranking artwork shared by every Core consumer. Consumers choose
11
+ * the ranking meaning; the Grammar owns the official Fluent Emoji Flat art.
12
+ */
13
+ export const RankArtwork = ({ className, kind, label, ...props }) => (_jsx("svg", { ...props, "aria-hidden": label === undefined ? "true" : undefined, "aria-label": label, className: cn("starci-core-rank-artwork", className), "data-grammar-rank-artwork": kind, fill: "none", focusable: "false", role: label === undefined ? undefined : "img", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: artworkByKind[kind] }));
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/RankArtwork/index.tsx"],"names":[],"mappings":";AACA,OAA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,EAAC,4kBAA4kB,EAAC,IAAI,EAAC,SAAS,GAAG,EACtmB,eAAM,CAAC,EAAC,qJAAqJ,EAAC,IAAI,EAAC,SAAS,GAAG,EAC/K,eAAM,CAAC,EAAC,oMAAoM,EAAC,IAAI,EAAC,SAAS,GAAG,EAC9N,eAAM,CAAC,EAAC,qOAAqO,EAAC,IAAI,EAAC,SAAS,GAAG,EAC/P,eAAM,CAAC,EAAC,wMAAwM,EAAC,IAAI,EAAC,SAAS,GAAG,IACnO,CACN;CACJ,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE,CAAC,CACnF,iBACQ,KAAK,iBACI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,gBACzC,KAAK,EACjB,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,+BACzB,IAAI,EAC/B,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,OAAO,EACjB,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAC7C,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,YAEjC,aAAa,CAAC,IAAI,CAAC,GAClB,CACT,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from "react";
2
+ export type SectionHeaderProps = {
3
+ readonly title: ReactNode;
4
+ readonly description?: ReactNode;
5
+ readonly eyebrow?: ReactNode;
6
+ readonly action?: ReactNode;
7
+ readonly level?: 1 | 2 | 3 | 4;
8
+ readonly className?: string;
9
+ readonly id?: string;
10
+ /** Closed semantic anatomy; ContextIntro requires eyebrow, title and description. */
11
+ readonly composition?: "section-header" | "context-intro";
12
+ };
13
+ /** Reusable title-copy-action hierarchy shared by StarCi product sections. */
14
+ export declare const SectionHeader: ({ title, description, eyebrow, action, level, className, id, composition, }: SectionHeaderProps) => import("react").JSX.Element;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/primitive/SectionHeader/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAA;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAAA;CAC5D,CAAA;AAED,8EAA8E;AAC9E,eAAO,MAAM,aAAa,GAAI,6EAS3B,kBAAkB,gCASpB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@heroui/react";
3
+ import { createElement } from "react";
4
+ /** Reusable title-copy-action hierarchy shared by StarCi product sections. */
5
+ export const SectionHeader = ({ title, description, eyebrow, action, level = 2, className, id, composition = "section-header", }) => (_jsxs("header", { className: cn("starci-core-section-header", className), "data-contract": "GAP-5", "data-grammar-section-header": "true", "data-grammar-composition": composition, children: [_jsxs("div", { className: "starci-core-section-header-copy", "data-contract": "GAP-2", children: [eyebrow === undefined ? null : _jsx("div", { className: "starci-core-section-eyebrow", children: eyebrow }), createElement(`h${level}`, { className: "starci-core-section-title", id, "data-contract": "MARGIN-0 FLOW-3" }, title), description === undefined ? null : _jsx("div", { className: "starci-core-section-description", children: description })] }), action === undefined ? null : _jsx("div", { className: "starci-core-section-action", children: action })] }));
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/SectionHeader/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAA;AAcrD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,KAAK,GAAG,CAAC,EACT,SAAS,EACT,EAAE,EACF,WAAW,GAAG,gBAAgB,GACb,EAAE,EAAE,CAAC,CACtB,kBAAQ,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,mBAAgB,OAAO,iCAA6B,MAAM,8BAA2B,WAAW,aAC1J,eAAK,SAAS,EAAC,iCAAiC,mBAAe,OAAO,aACjE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,6BAA6B,YAAE,OAAO,GAAO,EAC3F,aAAa,CAAC,IAAI,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,2BAA2B,EAAE,EAAE,EAAE,eAAe,EAAE,iBAAiB,EAAE,EAAE,KAAK,CAAC,EACrH,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,iCAAiC,YAAE,WAAW,GAAO,IACtG,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,4BAA4B,YAAE,MAAM,GAAO,IACpF,CACZ,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ export type SurfaceCopyGroupProps = ComponentPropsWithoutRef<"div"> & {
3
+ readonly density?: "compact" | "comfortable";
4
+ };
5
+ /** Groups one title with its explanation before a separate action boundary. */
6
+ export declare const SurfaceCopyGroup: ({ className, density, ...props }: SurfaceCopyGroupProps) => import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/primitive/SurfaceCopyGroup/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;CAC/C,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,GAAI,kCAA8C,qBAAqB,gCAOnG,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@heroui/react";
3
+ /** Groups one title with its explanation before a separate action boundary. */
4
+ export const SurfaceCopyGroup = ({ className, density = "compact", ...props }) => (_jsx("div", { ...props, className: cn("starci-core-surface-copy-group", className), "data-contract": density === "comfortable" ? "GAP-3" : "GAP-2", "data-grammar-copy-density": density }));
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/SurfaceCopyGroup/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAOlC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,KAAK,EAAyB,EAAE,EAAE,CAAC,CACrG,iBACQ,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,mBAC3C,OAAO,KAAK,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,+BACjC,OAAO,GACpC,CACL,CAAA"}
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ export type TextAs = "div" | "p" | "span";
3
+ export type TextTone = "default" | "muted" | "accent";
4
+ export type TextSize = "xs" | "sm" | "md" | "metric-lead";
5
+ export type TextWeight = "normal" | "medium" | "semibold";
6
+ export type TextLive = "off" | "polite" | "assertive";
7
+ export type TextProps = {
8
+ /** Select the semantic line owner without exposing styling hooks. */
9
+ readonly as?: TextAs;
10
+ readonly id?: string;
11
+ readonly children?: ReactNode;
12
+ /** App-owned glyph or other inline meaning placed before the copy. */
13
+ readonly startContent?: ReactNode;
14
+ readonly size?: TextSize;
15
+ readonly tone?: TextTone;
16
+ readonly weight?: TextWeight;
17
+ readonly live?: TextLive;
18
+ readonly isSkeleton?: boolean;
19
+ readonly isSuperseded?: boolean;
20
+ /** Opt into the shared selected-parent accent treatment. */
21
+ readonly parentEmphasis?: "accent-soft";
22
+ };
23
+ /** One resolved line of copy with explicit semantics, hierarchy and announcement behavior. */
24
+ export declare const Text: ({ as: Element, id, children, startContent, size, tone, weight, live, isSkeleton, isSuperseded, parentEmphasis, }: TextProps) => import("react").JSX.Element;
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/primitive/Text/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,CAAA;AACzC,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;AACrD,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,aAAa,CAAA;AACzD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;AACzD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG;IACpB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAA;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,CAAA;CAC1C,CAAA;AAkED,8FAA8F;AAC9F,eAAO,MAAM,IAAI,GAAI,kHAYlB,SAAS,gCA2BX,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, skeletonVariants } from "@heroui/react";
3
+ const LIVE_ROLES = { off: undefined, polite: "status", assertive: "alert" };
4
+ const TEXT_CLASS_NAME = cn("text-base", "leading-6", "font-normal", "text-foreground", "data-[size=xs]:text-xs", "data-[size=xs]:leading-4", "data-[size=xs]:text-muted", "data-[size=sm]:text-sm", "data-[size=sm]:leading-5", "data-[size=metric-lead]:text-3xl", "data-[size=metric-lead]:leading-9", "data-[tone=muted]:text-muted", "data-[tone=accent]:text-accent-soft-foreground", "data-[parent-emphasis=accent-soft]:group-data-[selected=true]:text-accent-soft-foreground", "data-[weight=medium]:font-medium", "data-[weight=semibold]:font-semibold", "data-[start-content=true]:inline-flex", "data-[start-content=true]:items-center", "data-[start-content=true]:gap-2", "data-[superseded=true]:line-through");
5
+ const FONT_RULE_BY_SIZE = {
6
+ xs: "FONT-1",
7
+ sm: "FONT-2",
8
+ md: "FONT-3",
9
+ "metric-lead": "FONT-5",
10
+ };
11
+ const TONE_RULE_BY_RESOLVED_TONE = {
12
+ default: "TONE-1",
13
+ muted: "TONE-2",
14
+ accent: "TONE-3",
15
+ };
16
+ /**
17
+ * Rule ids this element can claim from its resolved size and tone.
18
+ * `size` selects the exact scale row in font.md `## Scale` (FONT-1/2/3/5); the
19
+ * resolved tone (forced `muted` at `size="xs"`) selects the exact row in
20
+ * tone.md `## Scale` (TONE-1/2/3). `gap-2` fires only while `startContent` is
21
+ * shown, matching the `Text` with `startContent` row in gap.md's
22
+ * "Gaps Common already owns" table (GAP-2). Weight classes (`font-medium`,
23
+ * `font-semibold`) and the `parentEmphasis` accent-soft variant carry no rule
24
+ * id here and stay unclaimed.
25
+ */
26
+ const getTextContract = (size, resolvedTone, showsStartContent) => {
27
+ const ids = [FONT_RULE_BY_SIZE[size], TONE_RULE_BY_RESOLVED_TONE[resolvedTone]];
28
+ if (showsStartContent)
29
+ ids.push("GAP-2");
30
+ return ids.join(" ");
31
+ };
32
+ /**
33
+ * The skeleton keeps the size geometry (FONT-1/2/3/5) but its copy is
34
+ * `text-transparent`, so no tone is actually visible to claim.
35
+ */
36
+ const getTextSkeletonContract = (size) => FONT_RULE_BY_SIZE[size];
37
+ const SKELETON_CLASS_NAMES = {
38
+ xs: skeletonVariants({ animationType: "shimmer" }).base({
39
+ className: "inline-block w-10 select-none rounded text-xs leading-4 text-muted text-transparent",
40
+ }),
41
+ sm: skeletonVariants({ animationType: "shimmer" }).base({
42
+ className: "inline-block w-12 select-none rounded text-sm leading-5 text-transparent",
43
+ }),
44
+ md: skeletonVariants({ animationType: "shimmer" }).base({
45
+ className: "inline-block w-40 max-w-full select-none rounded text-base leading-6 text-transparent",
46
+ }),
47
+ "metric-lead": skeletonVariants({ animationType: "shimmer" }).base({
48
+ className: "inline-block w-40 max-w-full select-none rounded text-3xl leading-9 text-transparent",
49
+ }),
50
+ };
51
+ /** One resolved line of copy with explicit semantics, hierarchy and announcement behavior. */
52
+ export const Text = ({ as: Element = "div", id, children, startContent, size = "md", tone, weight = "normal", live = "off", isSkeleton = false, isSuperseded = false, parentEmphasis, }) => {
53
+ const resolvedTone = size === "xs" ? "muted" : tone ?? "default";
54
+ const showsStartContent = startContent != null && !isSkeleton;
55
+ return (_jsxs(Element, { id: id, "data-tier": "atom", "data-component": "Text", "data-size": size, "data-tone": resolvedTone, "data-weight": weight, "data-start-content": showsStartContent ? "true" : "false", "data-superseded": isSuperseded ? "true" : "false", "data-parent-emphasis": parentEmphasis, "data-live": live, "data-loading": isSkeleton ? "true" : "false", "data-contract": isSkeleton ? getTextSkeletonContract(size) : getTextContract(size, resolvedTone, showsStartContent), role: isSkeleton ? undefined : LIVE_ROLES[live], "aria-live": isSkeleton || live === "off" ? undefined : live, "aria-hidden": isSkeleton || undefined, className: isSkeleton ? SKELETON_CLASS_NAMES[size] : TEXT_CLASS_NAME, children: [showsStartContent ? startContent : null, isSkeleton ? "\u00a0" : children] }));
56
+ };
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/Text/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AA0BpD,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAW,CAAA;AAEpF,MAAM,eAAe,GAAG,EAAE,CACtB,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAC1D,wBAAwB,EAAE,0BAA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AAU,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,iBAC7C,UAAU,IAAI,SAAS,EACpC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,aAEnE,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EACvC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,IAC3B,CACb,CAAA;AACL,CAAC,CAAA"}
@@ -0,0 +1,45 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ActionAppearance, type ActionTextSize } from "../actionStyles.js";
3
+ type ActionBase = {
4
+ readonly children: ReactNode;
5
+ readonly startContent?: ReactNode;
6
+ readonly endContent?: ReactNode;
7
+ readonly appearance?: ActionAppearance;
8
+ readonly size?: ActionTextSize;
9
+ readonly isCurrent?: boolean;
10
+ readonly isDisabled?: boolean;
11
+ readonly isPending?: boolean;
12
+ readonly isSkeleton?: boolean;
13
+ };
14
+ /**
15
+ * A real browser destination. It renders an anchor, so middle-click, copy-link, and the `link` role
16
+ * come from the platform. While pending or disabled the href is withheld and the anchor is marked
17
+ * unavailable; it is never turned into a button to express that state.
18
+ */
19
+ type DestinationAction = {
20
+ readonly href: string;
21
+ readonly target?: "_blank" | "_self";
22
+ readonly rel?: string;
23
+ readonly download?: boolean | string;
24
+ /** Runs alongside navigation. It cannot cancel the destination. */
25
+ readonly onFollow?: () => void;
26
+ readonly onPress?: never;
27
+ };
28
+ /** A same-document command. It renders a button and owns pending against duplicate presses. */
29
+ type CommandAction = {
30
+ readonly onPress?: () => void;
31
+ readonly href?: never;
32
+ readonly target?: never;
33
+ readonly rel?: never;
34
+ readonly download?: never;
35
+ readonly onFollow?: never;
36
+ };
37
+ /**
38
+ * The text-shaped action. The element is decided by which of `href` or `onPress` is present, and
39
+ * the type forbids both, so a destination cannot be written as a button by choosing the wrong leaf.
40
+ */
41
+ export type TextActionProps = ActionBase & (DestinationAction | CommandAction);
42
+ /** Text-shaped action: an anchor for a destination, a button for a command. */
43
+ export declare const TextAction: (props: TextActionProps) => import("react").JSX.Element;
44
+ export type { ActionAppearance as TextActionAppearance, ActionTextSize as TextActionSize };
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/primitive/TextAction/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAsB,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnG,KAAK,UAAU,GAAG;IACd,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,KAAK,iBAAiB,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACpC,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAC3B,CAAA;AAED,+FAA+F;AAC/F,KAAK,aAAa,GAAG;IACjB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,CAAC,iBAAiB,GAAG,aAAa,CAAC,CAAA;AA+E9E,+EAA+E;AAC/E,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,gCA6EhD,CAAA;AAED,YAAY,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,cAAc,IAAI,cAAc,EAAE,CAAA"}
@@ -0,0 +1,112 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Spinner, skeletonVariants } from "@heroui/react";
4
+ import { useRef } from "react";
5
+ import { getActionClassName } from "../actionStyles.js";
6
+ const SKELETON_CLASS_NAME = skeletonVariants({ animationType: "shimmer" }).base({
7
+ className: "inline-flex w-16 shrink-0 select-none text-transparent",
8
+ });
9
+ const FONT_RULE_BY_SIZE = {
10
+ xs: "FONT-1",
11
+ sm: "FONT-2",
12
+ md: "FONT-3",
13
+ };
14
+ /**
15
+ * Padding rule ids per appearance, from actionStyles.ts's `APPEARANCE_CLASS_NAMES`.
16
+ * Each side is matched against padding.md's `## Scale` via the axis-variant rule
17
+ * (`px-*`/`py-*` apply an existing rule to one axis): `px-2 py-1` (choice) is
18
+ * PADDING-2 inline / PADDING-1 block; `px-3 py-2` (route, section) is PADDING-3
19
+ * inline / PADDING-2 block; `py-3` (tab) is PADDING-3 block only. `inline`,
20
+ * `muted`, `disclosure` and `plain` add no inset class.
21
+ */
22
+ const PADDING_RULES_BY_APPEARANCE = {
23
+ choice: ["PADDING-2", "PADDING-1"],
24
+ route: ["PADDING-3", "PADDING-2"],
25
+ section: ["PADDING-3", "PADDING-2"],
26
+ tab: ["PADDING-3"],
27
+ };
28
+ /**
29
+ * Tone rule ids per appearance, from actionStyles.ts's `APPEARANCE_CLASS_NAMES`,
30
+ * matched against tone.md `## Scale`. `choice`, `route` and `section` swap to the
31
+ * accent-soft foreground (TONE-3) only `data-[current=true]`, mirrored here from
32
+ * the already-known `isCurrent` prop. `tab`'s current-state color is `text-accent`,
33
+ * which tone.md does not publish, so that state stays unclaimed.
34
+ */
35
+ const getToneRule = (appearance, isCurrent) => {
36
+ switch (appearance) {
37
+ case "inline":
38
+ case "plain":
39
+ return "TONE-1";
40
+ case "muted":
41
+ return "TONE-2";
42
+ case "choice":
43
+ case "section":
44
+ return isCurrent ? "TONE-3" : "TONE-1";
45
+ case "route":
46
+ return isCurrent ? "TONE-3" : "TONE-2";
47
+ case "tab":
48
+ // Current state renders `text-accent`, which tone.md does not publish.
49
+ return isCurrent ? undefined : "TONE-2";
50
+ case "disclosure":
51
+ return "TONE-3";
52
+ }
53
+ };
54
+ /**
55
+ * Rule ids this element can claim from actionStyles.ts's shared recipe.
56
+ * `gap-2` (always present) matches gap.md's scale directly (GAP-2). `w-fit`
57
+ * (always present) matches measure.md's MEASURE-3 (Content width) catalog
58
+ * entry. Size selects the FONT-1/2/3 row. Appearance (with `isCurrent`)
59
+ * selects the tone row and any padding rows. `font-medium`/`font-semibold`,
60
+ * `rounded-full`/`rounded-large`, and the `tab` underline/border classes carry
61
+ * no rule id in their topic files and stay unclaimed.
62
+ */
63
+ /**
64
+ * `choice`, `route` and `section` swap to `bg-accent-soft` only `data-[current=true]`,
65
+ * pairing with the same `text-accent-soft-foreground` as TONE-3. That pair matches
66
+ * surface.md's SURFACE-4 catalog entry exactly.
67
+ */
68
+ const CURRENT_SURFACE_APPEARANCES = new Set(["choice", "route", "section"]);
69
+ const getActionContract = (appearance, size, isCurrent) => {
70
+ const toneRule = getToneRule(appearance, isCurrent);
71
+ const ids = ["GAP-2", "MEASURE-3", FONT_RULE_BY_SIZE[size], ...(toneRule === undefined ? [] : [toneRule])];
72
+ if (isCurrent && CURRENT_SURFACE_APPEARANCES.has(appearance))
73
+ ids.push("SURFACE-4");
74
+ const paddingRules = PADDING_RULES_BY_APPEARANCE[appearance];
75
+ if (paddingRules !== undefined)
76
+ ids.push(...paddingRules);
77
+ return ids.join(" ");
78
+ };
79
+ /** Text-shaped action: an anchor for a destination, a button for a command. */
80
+ export const TextAction = (props) => {
81
+ const { children, startContent, endContent, appearance = "inline", size = "sm", isCurrent = false, isDisabled = false, isPending = false, isSkeleton = false, } = props;
82
+ const pressLockRef = useRef(false);
83
+ const unavailable = isDisabled || isPending;
84
+ if (isSkeleton) {
85
+ return _jsx("span", { "data-tier": "atom", "data-component": "TextAction", "data-loading": "true", "aria-hidden": true, className: SKELETON_CLASS_NAME, children: "\u00A0" });
86
+ }
87
+ const shared = {
88
+ "data-tier": "atom",
89
+ "data-component": "TextAction",
90
+ "data-appearance": appearance,
91
+ "data-current": isCurrent ? "true" : "false",
92
+ "data-action-pending": isPending ? "true" : "false",
93
+ "aria-busy": isPending || undefined,
94
+ "data-contract": getActionContract(appearance, size, isCurrent),
95
+ className: getActionClassName(appearance, size),
96
+ };
97
+ const content = (_jsxs(_Fragment, { children: [isPending ? _jsx(Spinner, { size: "sm", color: "current", "aria-hidden": "true" }) : startContent, _jsx("span", { children: children }), isPending ? null : endContent] }));
98
+ if (props.href !== undefined) {
99
+ const { href, target, rel, download, onFollow } = props;
100
+ return (_jsx("a", { ...shared, "data-element": "a", role: unavailable ? "link" : undefined, "aria-disabled": unavailable || undefined, "aria-current": isCurrent ? appearance === "route" ? "page" : "true" : undefined, ...(unavailable ? {} : { href }), ...(target === undefined ? {} : { target }), ...(rel === undefined ? target === "_blank" ? { rel: "noopener noreferrer" } : {} : { rel }), ...(download === undefined ? {} : { download }), ...(onFollow === undefined || unavailable ? {} : { onClick: onFollow }), children: content }));
101
+ }
102
+ const { onPress } = props;
103
+ const press = () => {
104
+ if (unavailable || pressLockRef.current || onPress === undefined)
105
+ return;
106
+ pressLockRef.current = true;
107
+ onPress();
108
+ globalThis.setTimeout(() => { pressLockRef.current = false; }, 300);
109
+ };
110
+ return (_jsx("button", { ...shared, "data-element": "button", type: "button", disabled: unavailable, "aria-current": isCurrent ? appearance === "route" ? "page" : "true" : undefined, onClick: press, children: content }));
111
+ };
112
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/TextAction/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAA8C,MAAM,oBAAoB,CAAA;AA6CnG,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC;IAC5E,SAAS,EAAE,wDAAwD;CACtE,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAmC;IACtD,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACf,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,2BAA2B,GAA6D;IAC1F,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,KAAK,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IACjC,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IACnC,GAAG,EAAE,CAAC,WAAW,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AAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IACzB,MAAM,KAAK,GAAG,GAAG,EAAE;QACf,IAAI,WAAW,IAAI,YAAY,CAAC,OAAO,IAAI,OAAO,KAAK,SAAS;YAAE,OAAM;QACxE,YAAY,CAAC,OAAO,GAAG,IAAI,CAAA;QAC3B,OAAO,EAAE,CAAA;QACT,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,YAAY,CAAC,OAAO,GAAG,KAAK,CAAA,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IACtE,CAAC,CAAA;IAED,OAAO,CACH,oBACQ,MAAM,kBACG,QAAQ,EACrB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,WAAW,kBACP,SAAS,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC9E,OAAO,EAAE,KAAK,YAEb,OAAO,GACH,CACZ,CAAA;AACL,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type ActionAppearance = "inline" | "muted" | "choice" | "route" | "tab" | "section" | "disclosure" | "plain";
2
+ export type ActionTextSize = "xs" | "sm" | "md";
3
+ /** One typography/selection recipe shared by native links and text-styled actions. */
4
+ export declare const getActionClassName: (appearance: ActionAppearance, size: ActionTextSize) => import("tailwind-variants").CnReturn;
5
+ //# sourceMappingURL=actionStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionStyles.d.ts","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAA;AACnH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAmB/C,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,GAAI,YAAY,gBAAgB,EAAE,MAAM,cAAc,yCAKpF,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { cn } from "@heroui/react";
2
+ const SIZE_CLASS_NAMES = {
3
+ xs: "text-xs leading-4",
4
+ sm: "text-sm leading-5",
5
+ md: "text-base leading-6",
6
+ };
7
+ const APPEARANCE_CLASS_NAMES = {
8
+ inline: "font-medium text-foreground underline-offset-4 hover:underline focus-visible:underline",
9
+ muted: "font-medium text-muted underline-offset-4 hover:underline focus-visible:underline",
10
+ choice: "rounded-full px-2 py-1 font-medium text-foreground data-[current=true]:bg-accent-soft data-[current=true]:text-accent-soft-foreground",
11
+ route: "rounded-full px-3 py-2 text-muted data-[current=true]:bg-accent-soft data-[current=true]:font-semibold data-[current=true]:text-accent-soft-foreground",
12
+ tab: "border-b-2 border-transparent py-3 text-muted data-[current=true]:border-accent data-[current=true]:font-semibold data-[current=true]:text-accent",
13
+ section: "rounded-large px-3 py-2 text-foreground hover:bg-default focus-visible:bg-default data-[current=true]:bg-accent-soft data-[current=true]:font-semibold data-[current=true]:text-accent-soft-foreground",
14
+ disclosure: "font-semibold text-accent-soft-foreground underline-offset-4 hover:underline focus-visible:underline",
15
+ plain: "text-foreground no-underline",
16
+ };
17
+ /** One typography/selection recipe shared by native links and text-styled actions. */
18
+ export const getActionClassName = (appearance, size) => cn("group inline-flex w-fit min-w-0 shrink-0 items-center gap-2 outline-none", "disabled:cursor-default disabled:opacity-50", SIZE_CLASS_NAMES[size], APPEARANCE_CLASS_NAMES[appearance]);
19
+ //# sourceMappingURL=actionStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionStyles.js","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAKlC,MAAM,gBAAgB,GAAG;IACrB,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,qBAAqB;CACnB,CAAA;AAEV,MAAM,sBAAsB,GAAG;IAC3B,MAAM,EAAE,wFAAwF;IAChG,KAAK,EAAE,mFAAmF;IAC1F,MAAM,EAAE,uIAAuI;IAC/I,KAAK,EAAE,wJAAwJ;IAC/J,GAAG,EAAE,mJAAmJ;IACxJ,OAAO,EAAE,wMAAwM;IACjN,UAAU,EAAE,sGAAsG;IAClH,KAAK,EAAE,8BAA8B;CAC/B,CAAA;AAEV,sFAAsF;AACtF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAA4B,EAAE,IAAoB,EAAE,EAAE,CAAC,EAAE,CACxF,0EAA0E,EAC1E,6CAA6C,EAC7C,gBAAgB,CAAC,IAAI,CAAC,EACtB,sBAAsB,CAAC,UAAU,CAAC,CACrC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { assertPresentationState, type PresentationState } from "../common/index.js";
2
- export type { PresentationState } from "../common/index.js";
1
+ import { assertPresentationState, type PresentationState } from "../common/state.js";
2
+ export type { PresentationState } from "../common/state.js";
3
3
  export { assertPresentationState };
4
4
  type NeutralTreatment = {
5
5
  readonly state: PresentationState;
@@ -1,4 +1,4 @@
1
- import { PRESENTATION_STATES, assertPresentationState, } from "../common/index.js";
1
+ import { PRESENTATION_STATES, assertPresentationState, } from "../common/state.js";
2
2
  export { assertPresentationState };
3
3
  const neutralTreatment = (state) => {
4
4
  const id = String(state);