@hjmds/design-contracts 0.8.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 (353) hide show
  1. package/README.md +208 -0
  2. package/dist/alert-dialog.d.ts +102 -0
  3. package/dist/alert-dialog.d.ts.map +1 -0
  4. package/dist/alert-dialog.js +136 -0
  5. package/dist/alert-dialog.js.map +1 -0
  6. package/dist/base-recipes.d.ts +184 -0
  7. package/dist/base-recipes.d.ts.map +1 -0
  8. package/dist/base-recipes.js +129 -0
  9. package/dist/base-recipes.js.map +1 -0
  10. package/dist/behaviors.d.ts +1254 -0
  11. package/dist/behaviors.d.ts.map +1 -0
  12. package/dist/behaviors.js +972 -0
  13. package/dist/behaviors.js.map +1 -0
  14. package/dist/bottom-navigation-defaults.d.ts +13 -0
  15. package/dist/bottom-navigation-defaults.d.ts.map +1 -0
  16. package/dist/bottom-navigation-defaults.js +10 -0
  17. package/dist/bottom-navigation-defaults.js.map +1 -0
  18. package/dist/bottom-navigation.d.ts +114 -0
  19. package/dist/bottom-navigation.d.ts.map +1 -0
  20. package/dist/bottom-navigation.js +223 -0
  21. package/dist/bottom-navigation.js.map +1 -0
  22. package/dist/breadcrumb.d.ts +97 -0
  23. package/dist/breadcrumb.d.ts.map +1 -0
  24. package/dist/breadcrumb.js +99 -0
  25. package/dist/breadcrumb.js.map +1 -0
  26. package/dist/calendar.d.ts +285 -0
  27. package/dist/calendar.d.ts.map +1 -0
  28. package/dist/calendar.js +297 -0
  29. package/dist/calendar.js.map +1 -0
  30. package/dist/card.d.ts +39 -0
  31. package/dist/card.d.ts.map +1 -0
  32. package/dist/card.js +50 -0
  33. package/dist/card.js.map +1 -0
  34. package/dist/carousel.d.ts +180 -0
  35. package/dist/carousel.d.ts.map +1 -0
  36. package/dist/carousel.js +172 -0
  37. package/dist/carousel.js.map +1 -0
  38. package/dist/catalog.d.ts +7158 -0
  39. package/dist/catalog.d.ts.map +1 -0
  40. package/dist/catalog.js +220 -0
  41. package/dist/catalog.js.map +1 -0
  42. package/dist/collection.d.ts +123 -0
  43. package/dist/collection.d.ts.map +1 -0
  44. package/dist/collection.js +211 -0
  45. package/dist/collection.js.map +1 -0
  46. package/dist/color-references.d.ts +46 -0
  47. package/dist/color-references.d.ts.map +1 -0
  48. package/dist/color-references.js +39 -0
  49. package/dist/color-references.js.map +1 -0
  50. package/dist/colors.d.ts +56 -0
  51. package/dist/colors.d.ts.map +1 -0
  52. package/dist/colors.js +90 -0
  53. package/dist/colors.js.map +1 -0
  54. package/dist/command-palette.d.ts +240 -0
  55. package/dist/command-palette.d.ts.map +1 -0
  56. package/dist/command-palette.js +97 -0
  57. package/dist/command-palette.js.map +1 -0
  58. package/dist/component-contracts.d.ts +137 -0
  59. package/dist/component-contracts.d.ts.map +1 -0
  60. package/dist/component-contracts.js +53 -0
  61. package/dist/component-contracts.js.map +1 -0
  62. package/dist/component-definitions.d.ts +135 -0
  63. package/dist/component-definitions.d.ts.map +1 -0
  64. package/dist/component-definitions.js +142 -0
  65. package/dist/component-definitions.js.map +1 -0
  66. package/dist/component-recipes.d.ts +3583 -0
  67. package/dist/component-recipes.d.ts.map +1 -0
  68. package/dist/component-recipes.js +1503 -0
  69. package/dist/component-recipes.js.map +1 -0
  70. package/dist/component-references.d.ts +416 -0
  71. package/dist/component-references.d.ts.map +1 -0
  72. package/dist/component-references.js +140 -0
  73. package/dist/component-references.js.map +1 -0
  74. package/dist/content-state.d.ts +104 -0
  75. package/dist/content-state.d.ts.map +1 -0
  76. package/dist/content-state.js +116 -0
  77. package/dist/content-state.js.map +1 -0
  78. package/dist/counter-badge-recipe.d.ts +80 -0
  79. package/dist/counter-badge-recipe.d.ts.map +1 -0
  80. package/dist/counter-badge-recipe.js +44 -0
  81. package/dist/counter-badge-recipe.js.map +1 -0
  82. package/dist/counter-badge.d.ts +12 -0
  83. package/dist/counter-badge.d.ts.map +1 -0
  84. package/dist/counter-badge.js +21 -0
  85. package/dist/counter-badge.js.map +1 -0
  86. package/dist/data-table.d.ts +203 -0
  87. package/dist/data-table.d.ts.map +1 -0
  88. package/dist/data-table.js +182 -0
  89. package/dist/data-table.js.map +1 -0
  90. package/dist/date-picker.d.ts +268 -0
  91. package/dist/date-picker.d.ts.map +1 -0
  92. package/dist/date-picker.js +168 -0
  93. package/dist/date-picker.js.map +1 -0
  94. package/dist/description-list.d.ts +68 -0
  95. package/dist/description-list.d.ts.map +1 -0
  96. package/dist/description-list.js +85 -0
  97. package/dist/description-list.js.map +1 -0
  98. package/dist/design-system-provider.d.ts +80 -0
  99. package/dist/design-system-provider.d.ts.map +1 -0
  100. package/dist/design-system-provider.js +147 -0
  101. package/dist/design-system-provider.js.map +1 -0
  102. package/dist/evidence.d.ts +49 -0
  103. package/dist/evidence.d.ts.map +1 -0
  104. package/dist/evidence.js +133 -0
  105. package/dist/evidence.js.map +1 -0
  106. package/dist/file-picker.d.ts +183 -0
  107. package/dist/file-picker.d.ts.map +1 -0
  108. package/dist/file-picker.js +224 -0
  109. package/dist/file-picker.js.map +1 -0
  110. package/dist/floating-action-button.d.ts +143 -0
  111. package/dist/floating-action-button.d.ts.map +1 -0
  112. package/dist/floating-action-button.js +149 -0
  113. package/dist/floating-action-button.js.map +1 -0
  114. package/dist/form.d.ts +143 -0
  115. package/dist/form.d.ts.map +1 -0
  116. package/dist/form.js +206 -0
  117. package/dist/form.js.map +1 -0
  118. package/dist/foundations.d.ts +300 -0
  119. package/dist/foundations.d.ts.map +1 -0
  120. package/dist/foundations.js +238 -0
  121. package/dist/foundations.js.map +1 -0
  122. package/dist/grid.d.ts +75 -0
  123. package/dist/grid.d.ts.map +1 -0
  124. package/dist/grid.js +133 -0
  125. package/dist/grid.js.map +1 -0
  126. package/dist/icon-button-recipe.d.ts +99 -0
  127. package/dist/icon-button-recipe.d.ts.map +1 -0
  128. package/dist/icon-button-recipe.js +53 -0
  129. package/dist/icon-button-recipe.js.map +1 -0
  130. package/dist/icon.d.ts +41 -0
  131. package/dist/icon.d.ts.map +1 -0
  132. package/dist/icon.js +147 -0
  133. package/dist/icon.js.map +1 -0
  134. package/dist/image.d.ts +82 -0
  135. package/dist/image.d.ts.map +1 -0
  136. package/dist/image.js +100 -0
  137. package/dist/image.js.map +1 -0
  138. package/dist/index.d.ts +58 -0
  139. package/dist/index.d.ts.map +1 -0
  140. package/dist/index.js +66 -0
  141. package/dist/index.js.map +1 -0
  142. package/dist/layout.d.ts +118 -0
  143. package/dist/layout.d.ts.map +1 -0
  144. package/dist/layout.js +118 -0
  145. package/dist/layout.js.map +1 -0
  146. package/dist/link.d.ts +57 -0
  147. package/dist/link.d.ts.map +1 -0
  148. package/dist/link.js +142 -0
  149. package/dist/link.js.map +1 -0
  150. package/dist/load-more.d.ts +64 -0
  151. package/dist/load-more.d.ts.map +1 -0
  152. package/dist/load-more.js +124 -0
  153. package/dist/load-more.js.map +1 -0
  154. package/dist/mentions.d.ts +67 -0
  155. package/dist/mentions.d.ts.map +1 -0
  156. package/dist/mentions.js +107 -0
  157. package/dist/mentions.js.map +1 -0
  158. package/dist/number-field.d.ts +208 -0
  159. package/dist/number-field.d.ts.map +1 -0
  160. package/dist/number-field.js +247 -0
  161. package/dist/number-field.js.map +1 -0
  162. package/dist/otp-field.d.ts +152 -0
  163. package/dist/otp-field.d.ts.map +1 -0
  164. package/dist/otp-field.js +117 -0
  165. package/dist/otp-field.js.map +1 -0
  166. package/dist/pagination.d.ts +181 -0
  167. package/dist/pagination.d.ts.map +1 -0
  168. package/dist/pagination.js +226 -0
  169. package/dist/pagination.js.map +1 -0
  170. package/dist/password-field.d.ts +187 -0
  171. package/dist/password-field.d.ts.map +1 -0
  172. package/dist/password-field.js +120 -0
  173. package/dist/password-field.js.map +1 -0
  174. package/dist/popover.d.ts +152 -0
  175. package/dist/popover.d.ts.map +1 -0
  176. package/dist/popover.js +137 -0
  177. package/dist/popover.js.map +1 -0
  178. package/dist/progress-recipe.d.ts +43 -0
  179. package/dist/progress-recipe.d.ts.map +1 -0
  180. package/dist/progress-recipe.js +16 -0
  181. package/dist/progress-recipe.js.map +1 -0
  182. package/dist/recipes.d.ts +31 -0
  183. package/dist/recipes.d.ts.map +1 -0
  184. package/dist/recipes.js +46 -0
  185. package/dist/recipes.js.map +1 -0
  186. package/dist/responsive.d.ts +27 -0
  187. package/dist/responsive.d.ts.map +1 -0
  188. package/dist/responsive.js +66 -0
  189. package/dist/responsive.js.map +1 -0
  190. package/dist/result.d.ts +111 -0
  191. package/dist/result.d.ts.map +1 -0
  192. package/dist/result.js +97 -0
  193. package/dist/result.js.map +1 -0
  194. package/dist/selection-helpers.d.ts +16 -0
  195. package/dist/selection-helpers.d.ts.map +1 -0
  196. package/dist/selection-helpers.js +52 -0
  197. package/dist/selection-helpers.js.map +1 -0
  198. package/dist/semantic-colors.d.ts +275 -0
  199. package/dist/semantic-colors.d.ts.map +1 -0
  200. package/dist/semantic-colors.js +84 -0
  201. package/dist/semantic-colors.js.map +1 -0
  202. package/dist/sheet.d.ts +51 -0
  203. package/dist/sheet.d.ts.map +1 -0
  204. package/dist/sheet.js +69 -0
  205. package/dist/sheet.js.map +1 -0
  206. package/dist/showcase.d.ts +153 -0
  207. package/dist/showcase.d.ts.map +1 -0
  208. package/dist/showcase.js +210 -0
  209. package/dist/showcase.js.map +1 -0
  210. package/dist/side-panel.d.ts +199 -0
  211. package/dist/side-panel.d.ts.map +1 -0
  212. package/dist/side-panel.js +111 -0
  213. package/dist/side-panel.js.map +1 -0
  214. package/dist/slider.d.ts +138 -0
  215. package/dist/slider.d.ts.map +1 -0
  216. package/dist/slider.js +150 -0
  217. package/dist/slider.js.map +1 -0
  218. package/dist/splitter.d.ts +113 -0
  219. package/dist/splitter.d.ts.map +1 -0
  220. package/dist/splitter.js +99 -0
  221. package/dist/splitter.js.map +1 -0
  222. package/dist/statistic.d.ts +41 -0
  223. package/dist/statistic.d.ts.map +1 -0
  224. package/dist/statistic.js +76 -0
  225. package/dist/statistic.js.map +1 -0
  226. package/dist/steps.d.ts +196 -0
  227. package/dist/steps.d.ts.map +1 -0
  228. package/dist/steps.js +160 -0
  229. package/dist/steps.js.map +1 -0
  230. package/dist/tag.d.ts +128 -0
  231. package/dist/tag.d.ts.map +1 -0
  232. package/dist/tag.js +93 -0
  233. package/dist/tag.js.map +1 -0
  234. package/dist/timeline.d.ts +147 -0
  235. package/dist/timeline.d.ts.map +1 -0
  236. package/dist/timeline.js +127 -0
  237. package/dist/timeline.js.map +1 -0
  238. package/dist/toast.d.ts +164 -0
  239. package/dist/toast.d.ts.map +1 -0
  240. package/dist/toast.js +529 -0
  241. package/dist/toast.js.map +1 -0
  242. package/dist/tokens.d.ts +9 -0
  243. package/dist/tokens.d.ts.map +1 -0
  244. package/dist/tokens.js +9 -0
  245. package/dist/tokens.js.map +1 -0
  246. package/dist/tooltip.d.ts +44 -0
  247. package/dist/tooltip.d.ts.map +1 -0
  248. package/dist/tooltip.js +88 -0
  249. package/dist/tooltip.js.map +1 -0
  250. package/dist/tour.d.ts +218 -0
  251. package/dist/tour.d.ts.map +1 -0
  252. package/dist/tour.js +211 -0
  253. package/dist/tour.js.map +1 -0
  254. package/dist/transfer-list.d.ts +207 -0
  255. package/dist/transfer-list.d.ts.map +1 -0
  256. package/dist/transfer-list.js +193 -0
  257. package/dist/transfer-list.js.map +1 -0
  258. package/dist/tree-select.d.ts +78 -0
  259. package/dist/tree-select.d.ts.map +1 -0
  260. package/dist/tree-select.js +132 -0
  261. package/dist/tree-select.js.map +1 -0
  262. package/dist/tree.d.ts +206 -0
  263. package/dist/tree.d.ts.map +1 -0
  264. package/dist/tree.js +223 -0
  265. package/dist/tree.js.map +1 -0
  266. package/dist/upload-item.d.ts +173 -0
  267. package/dist/upload-item.d.ts.map +1 -0
  268. package/dist/upload-item.js +156 -0
  269. package/dist/upload-item.js.map +1 -0
  270. package/dist/version.d.ts +3 -0
  271. package/dist/version.d.ts.map +1 -0
  272. package/dist/version.js +3 -0
  273. package/dist/version.js.map +1 -0
  274. package/docs/affix.md +63 -0
  275. package/docs/anchor.md +59 -0
  276. package/docs/ant-design-coverage.md +119 -0
  277. package/docs/app-provider.md +50 -0
  278. package/docs/app-rn-adoption.md +227 -0
  279. package/docs/architecture.md +320 -0
  280. package/docs/authoring-brief.md +87 -0
  281. package/docs/border-beam.md +66 -0
  282. package/docs/bottom-navigation.md +127 -0
  283. package/docs/breadcrumb.md +82 -0
  284. package/docs/calendar.md +154 -0
  285. package/docs/carousel.md +130 -0
  286. package/docs/cascader.md +93 -0
  287. package/docs/catalog-decision-status.md +306 -0
  288. package/docs/color-picker.md +72 -0
  289. package/docs/command-palette.md +116 -0
  290. package/docs/confirm-popover.md +93 -0
  291. package/docs/consistency-audit.md +383 -0
  292. package/docs/consumer-release-gate.md +90 -0
  293. package/docs/content-state.md +156 -0
  294. package/docs/context-panel.md +88 -0
  295. package/docs/cross-platform-core-normalization.md +118 -0
  296. package/docs/data-table.md +79 -0
  297. package/docs/date-picker.md +84 -0
  298. package/docs/description-list.md +75 -0
  299. package/docs/design-system-provider.md +139 -0
  300. package/docs/dropdown.md +78 -0
  301. package/docs/expansion-roadmap.md +285 -0
  302. package/docs/file-picker.md +59 -0
  303. package/docs/floating-action-button.md +111 -0
  304. package/docs/form.md +134 -0
  305. package/docs/generated/component-maturity.md +103 -0
  306. package/docs/generated/renderer-evidence.json +5597 -0
  307. package/docs/generated/renderer-evidence.md +132 -0
  308. package/docs/generated/showcase-manifest.json +3732 -0
  309. package/docs/icon.md +22 -0
  310. package/docs/identity.md +121 -0
  311. package/docs/image.md +84 -0
  312. package/docs/implementation-0.5.md +85 -0
  313. package/docs/layout-primitives.md +107 -0
  314. package/docs/layout.md +83 -0
  315. package/docs/library-reference-decisions.md +123 -0
  316. package/docs/link.md +67 -0
  317. package/docs/load-more.md +31 -0
  318. package/docs/mentions.md +82 -0
  319. package/docs/migration-0.2.md +108 -0
  320. package/docs/migration-0.3.md +72 -0
  321. package/docs/migration-0.5.md +82 -0
  322. package/docs/migration-0.6.md +197 -0
  323. package/docs/notification.md +54 -0
  324. package/docs/number-field.md +82 -0
  325. package/docs/otp-field.md +103 -0
  326. package/docs/pagination.md +139 -0
  327. package/docs/password-field.md +98 -0
  328. package/docs/popover.md +124 -0
  329. package/docs/promotion-candidates.md +169 -0
  330. package/docs/qr-code.md +69 -0
  331. package/docs/rating.md +58 -0
  332. package/docs/responsive-grid.md +90 -0
  333. package/docs/result.md +96 -0
  334. package/docs/showcase.md +97 -0
  335. package/docs/side-panel.md +71 -0
  336. package/docs/slider.md +79 -0
  337. package/docs/splitter.md +55 -0
  338. package/docs/statistic.md +16 -0
  339. package/docs/steps.md +115 -0
  340. package/docs/tag.md +57 -0
  341. package/docs/time-picker.md +88 -0
  342. package/docs/timeline.md +146 -0
  343. package/docs/toast.md +127 -0
  344. package/docs/tooltip.md +58 -0
  345. package/docs/tour.md +136 -0
  346. package/docs/transfer-list.md +94 -0
  347. package/docs/tree-select.md +101 -0
  348. package/docs/tree.md +123 -0
  349. package/docs/upload-item.md +68 -0
  350. package/docs/utility.md +53 -0
  351. package/docs/virtual-list.md +70 -0
  352. package/docs/watermark.md +58 -0
  353. package/package.json +402 -0
@@ -0,0 +1,275 @@
1
+ /**
2
+ * Stable role aliases above the legacy ThemeColors key set. New recipes should
3
+ * prefer these roles so the underlying theme shape can evolve independently.
4
+ */
5
+ export declare const semanticColors: {
6
+ readonly canvas: Readonly<{
7
+ source: "theme";
8
+ key: "bg";
9
+ alpha?: number;
10
+ }>;
11
+ readonly surface: {
12
+ readonly default: Readonly<{
13
+ source: "theme";
14
+ key: "surface";
15
+ alpha?: number;
16
+ }>;
17
+ readonly sunken: Readonly<{
18
+ source: "theme";
19
+ key: "surfaceAlt";
20
+ alpha?: number;
21
+ }>;
22
+ readonly raised: Readonly<{
23
+ source: "theme";
24
+ key: "bg";
25
+ alpha?: number;
26
+ }>;
27
+ readonly brand: Readonly<{
28
+ source: "theme";
29
+ key: "surfaceAccent";
30
+ alpha?: number;
31
+ }>;
32
+ };
33
+ readonly content: {
34
+ readonly primary: Readonly<{
35
+ source: "theme";
36
+ key: "text";
37
+ alpha?: number;
38
+ }>;
39
+ readonly body: Readonly<{
40
+ source: "theme";
41
+ key: "textBody";
42
+ alpha?: number;
43
+ }>;
44
+ readonly secondary: Readonly<{
45
+ source: "theme";
46
+ key: "textMuted";
47
+ alpha?: number;
48
+ }>;
49
+ readonly tertiary: Readonly<{
50
+ source: "theme";
51
+ key: "textSub";
52
+ alpha?: number;
53
+ }>;
54
+ readonly decorative: Readonly<{
55
+ source: "theme";
56
+ key: "textWeak";
57
+ alpha?: number;
58
+ }>;
59
+ readonly brand: Readonly<{
60
+ source: "theme";
61
+ key: "contentBrand";
62
+ alpha?: number;
63
+ }>;
64
+ readonly danger: Readonly<{
65
+ source: "theme";
66
+ key: "danger";
67
+ alpha?: number;
68
+ }>;
69
+ readonly inverse: Readonly<{
70
+ source: "theme";
71
+ key: "onPrimary";
72
+ alpha?: number;
73
+ }>;
74
+ };
75
+ readonly border: {
76
+ readonly subtle: Readonly<{
77
+ source: "theme";
78
+ key: "border";
79
+ alpha?: number;
80
+ }>;
81
+ readonly default: Readonly<{
82
+ source: "theme";
83
+ key: "border";
84
+ alpha?: number;
85
+ }>;
86
+ readonly strong: Readonly<{
87
+ source: "theme";
88
+ key: "textWeak";
89
+ alpha?: number;
90
+ }>;
91
+ readonly focus: Readonly<{
92
+ source: "theme";
93
+ key: "contentBrand";
94
+ alpha?: number;
95
+ }>;
96
+ readonly danger: Readonly<{
97
+ source: "theme";
98
+ key: "danger";
99
+ alpha?: number;
100
+ }>;
101
+ };
102
+ readonly action: {
103
+ readonly brand: {
104
+ readonly background: Readonly<{
105
+ source: "theme";
106
+ key: "primary";
107
+ alpha?: number;
108
+ }>;
109
+ readonly content: Readonly<{
110
+ source: "theme";
111
+ key: "onPrimary";
112
+ alpha?: number;
113
+ }>;
114
+ };
115
+ readonly neutral: {
116
+ readonly background: Readonly<{
117
+ source: "theme";
118
+ key: "surfaceAlt";
119
+ alpha?: number;
120
+ }>;
121
+ readonly content: Readonly<{
122
+ source: "theme";
123
+ key: "text";
124
+ alpha?: number;
125
+ }>;
126
+ };
127
+ readonly danger: {
128
+ readonly background: Readonly<{
129
+ source: "theme";
130
+ key: "dangerFill";
131
+ alpha?: number;
132
+ }>;
133
+ readonly content: Readonly<{
134
+ source: "theme";
135
+ key: "onDanger";
136
+ alpha?: number;
137
+ }>;
138
+ };
139
+ };
140
+ readonly feedback: {
141
+ readonly info: {
142
+ readonly foreground: Readonly<{
143
+ source: "accent";
144
+ key: "info";
145
+ alpha?: number;
146
+ }>;
147
+ readonly background: Readonly<{
148
+ source: "accent";
149
+ key: "info";
150
+ alpha?: number;
151
+ }>;
152
+ readonly badgeBackground: Readonly<{
153
+ source: "accent";
154
+ key: "info";
155
+ alpha?: number;
156
+ }>;
157
+ readonly border: Readonly<{
158
+ source: "accent";
159
+ key: "info";
160
+ alpha?: number;
161
+ }>;
162
+ };
163
+ readonly success: {
164
+ readonly foreground: Readonly<{
165
+ source: "accent";
166
+ key: "success";
167
+ alpha?: number;
168
+ }>;
169
+ readonly background: Readonly<{
170
+ source: "accent";
171
+ key: "success";
172
+ alpha?: number;
173
+ }>;
174
+ readonly badgeBackground: Readonly<{
175
+ source: "accent";
176
+ key: "success";
177
+ alpha?: number;
178
+ }>;
179
+ readonly border: Readonly<{
180
+ source: "accent";
181
+ key: "success";
182
+ alpha?: number;
183
+ }>;
184
+ };
185
+ readonly warning: {
186
+ readonly foreground: Readonly<{
187
+ source: "accent";
188
+ key: "warning";
189
+ alpha?: number;
190
+ }>;
191
+ readonly background: Readonly<{
192
+ source: "accent";
193
+ key: "warning";
194
+ alpha?: number;
195
+ }>;
196
+ readonly badgeBackground: Readonly<{
197
+ source: "accent";
198
+ key: "warning";
199
+ alpha?: number;
200
+ }>;
201
+ readonly border: Readonly<{
202
+ source: "accent";
203
+ key: "warning";
204
+ alpha?: number;
205
+ }>;
206
+ };
207
+ readonly attention: {
208
+ readonly foreground: Readonly<{
209
+ source: "accent";
210
+ key: "attention";
211
+ alpha?: number;
212
+ }>;
213
+ readonly background: Readonly<{
214
+ source: "accent";
215
+ key: "attention";
216
+ alpha?: number;
217
+ }>;
218
+ readonly badgeBackground: Readonly<{
219
+ source: "accent";
220
+ key: "attention";
221
+ alpha?: number;
222
+ }>;
223
+ readonly border: Readonly<{
224
+ source: "accent";
225
+ key: "attention";
226
+ alpha?: number;
227
+ }>;
228
+ };
229
+ readonly danger: {
230
+ readonly foreground: Readonly<{
231
+ source: "theme";
232
+ key: "danger";
233
+ alpha?: number;
234
+ }>;
235
+ readonly background: Readonly<{
236
+ source: "theme";
237
+ key: "danger";
238
+ alpha?: number;
239
+ }>;
240
+ readonly badgeBackground: Readonly<{
241
+ source: "theme";
242
+ key: "danger";
243
+ alpha?: number;
244
+ }>;
245
+ readonly border: Readonly<{
246
+ source: "theme";
247
+ key: "danger";
248
+ alpha?: number;
249
+ }>;
250
+ };
251
+ };
252
+ readonly interaction: {
253
+ readonly hover: Readonly<{
254
+ source: "theme";
255
+ key: "text";
256
+ alpha?: number;
257
+ }>;
258
+ readonly focus: Readonly<{
259
+ source: "theme";
260
+ key: "contentBrand";
261
+ alpha?: number;
262
+ }>;
263
+ readonly pressed: Readonly<{
264
+ source: "theme";
265
+ key: "text";
266
+ alpha?: number;
267
+ }>;
268
+ readonly selected: Readonly<{
269
+ source: "theme";
270
+ key: "primary";
271
+ alpha?: number;
272
+ }>;
273
+ };
274
+ };
275
+ //# sourceMappingURL=semantic-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic-colors.d.ts","sourceRoot":"","sources":["../src/semantic-colors.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EjB,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { accentColor, themeColor } from "./color-references.js";
2
+ /**
3
+ * Stable role aliases above the legacy ThemeColors key set. New recipes should
4
+ * prefer these roles so the underlying theme shape can evolve independently.
5
+ */
6
+ export const semanticColors = {
7
+ canvas: themeColor("bg"),
8
+ surface: {
9
+ default: themeColor("surface"),
10
+ sunken: themeColor("surfaceAlt"),
11
+ raised: themeColor("bg"),
12
+ brand: themeColor("surfaceAccent"),
13
+ },
14
+ content: {
15
+ primary: themeColor("text"),
16
+ body: themeColor("textBody"),
17
+ secondary: themeColor("textMuted"),
18
+ tertiary: themeColor("textSub"),
19
+ decorative: themeColor("textWeak"),
20
+ brand: themeColor("contentBrand"),
21
+ danger: themeColor("danger"),
22
+ inverse: themeColor("onPrimary"),
23
+ },
24
+ border: {
25
+ subtle: themeColor("border", 0.7),
26
+ default: themeColor("border"),
27
+ strong: themeColor("textWeak"),
28
+ focus: themeColor("contentBrand"),
29
+ danger: themeColor("danger"),
30
+ },
31
+ action: {
32
+ brand: {
33
+ background: themeColor("primary"),
34
+ content: themeColor("onPrimary"),
35
+ },
36
+ neutral: {
37
+ background: themeColor("surfaceAlt"),
38
+ content: themeColor("text"),
39
+ },
40
+ danger: {
41
+ background: themeColor("dangerFill"),
42
+ content: themeColor("onDanger"),
43
+ },
44
+ },
45
+ feedback: {
46
+ info: {
47
+ foreground: accentColor("info"),
48
+ background: accentColor("info", 0.1),
49
+ badgeBackground: accentColor("info", 0.1),
50
+ border: accentColor("info", 0.3),
51
+ },
52
+ success: {
53
+ foreground: accentColor("success"),
54
+ background: accentColor("success", 0.1),
55
+ badgeBackground: accentColor("success", 0.1),
56
+ border: accentColor("success", 0.3),
57
+ },
58
+ warning: {
59
+ foreground: accentColor("warning"),
60
+ background: accentColor("warning", 0.1),
61
+ badgeBackground: accentColor("warning", 0.1),
62
+ border: accentColor("warning", 0.3),
63
+ },
64
+ attention: {
65
+ foreground: accentColor("attention"),
66
+ background: accentColor("attention", 0.1),
67
+ badgeBackground: accentColor("attention", 0.1),
68
+ border: accentColor("attention", 0.3),
69
+ },
70
+ danger: {
71
+ foreground: themeColor("danger"),
72
+ background: themeColor("danger", 0.1),
73
+ badgeBackground: themeColor("danger", 0.1),
74
+ border: themeColor("danger", 0.3),
75
+ },
76
+ },
77
+ interaction: {
78
+ hover: themeColor("text", 0.06),
79
+ focus: themeColor("contentBrand", 0.08),
80
+ pressed: themeColor("text", 0.1),
81
+ selected: themeColor("primary", 0.1),
82
+ },
83
+ };
84
+ //# sourceMappingURL=semantic-colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic-colors.js","sourceRoot":"","sources":["../src/semantic-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC;QAC9B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;QAChC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC;QACxB,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC;KACnC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC;QAC3B,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;QAC5B,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC;QAClC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;QAC/B,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;QAClC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;QACjC,MAA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AAC,SAAS,EAAE,GAAG,CAAC;YACvC,eAAe,EAAE,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC;YAC5C,MAAM,EAAE,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC;SACpC;QACD,SAAS,EAAE;YACT,UAAU,EAAE,WAAW,CAAC,WAAW,CAAC;YACpC,UAAU,EAAE,WAAW,CAAC,WAAW,EAAE,GAAG,CAAC;YACzC,eAAe,EAAE,WAAW,CAAC,WAAW,EAAE,GAAG,CAAC;YAC9C,MAAM,EAAE,WAAW,CAAC,WAAW,EAAE,GAAG,CAAC;SACtC;QACD,MAAM,EAAE;YACN,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC;YAChC,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC;YACrC,eAAe,EAAE,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC;YAC1C,MAAM,EAAE,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC;SAClC;KACF;IACD,WAAW,EAAE;QACX,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;QAC/B,KAAK,EAAE,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC;QACvC,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;QAChC,QAAQ,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC;KACrC;CACO,CAAC","sourcesContent":["import { accentColor, themeColor } from \"./color-references.js\";\n\n/**\n * Stable role aliases above the legacy ThemeColors key set. New recipes should\n * prefer these roles so the underlying theme shape can evolve independently.\n */\nexport const semanticColors = {\n canvas: themeColor(\"bg\"),\n surface: {\n default: themeColor(\"surface\"),\n sunken: themeColor(\"surfaceAlt\"),\n raised: themeColor(\"bg\"),\n brand: themeColor(\"surfaceAccent\"),\n },\n content: {\n primary: themeColor(\"text\"),\n body: themeColor(\"textBody\"),\n secondary: themeColor(\"textMuted\"),\n tertiary: themeColor(\"textSub\"),\n decorative: themeColor(\"textWeak\"),\n brand: themeColor(\"contentBrand\"),\n danger: themeColor(\"danger\"),\n inverse: themeColor(\"onPrimary\"),\n },\n border: {\n subtle: themeColor(\"border\", 0.7),\n default: themeColor(\"border\"),\n strong: themeColor(\"textWeak\"),\n focus: themeColor(\"contentBrand\"),\n danger: themeColor(\"danger\"),\n },\n action: {\n brand: {\n background: themeColor(\"primary\"),\n content: themeColor(\"onPrimary\"),\n },\n neutral: {\n background: themeColor(\"surfaceAlt\"),\n content: themeColor(\"text\"),\n },\n danger: {\n background: themeColor(\"dangerFill\"),\n content: themeColor(\"onDanger\"),\n },\n },\n feedback: {\n info: {\n foreground: accentColor(\"info\"),\n background: accentColor(\"info\", 0.1),\n badgeBackground: accentColor(\"info\", 0.1),\n border: accentColor(\"info\", 0.3),\n },\n success: {\n foreground: accentColor(\"success\"),\n background: accentColor(\"success\", 0.1),\n badgeBackground: accentColor(\"success\", 0.1),\n border: accentColor(\"success\", 0.3),\n },\n warning: {\n foreground: accentColor(\"warning\"),\n background: accentColor(\"warning\", 0.1),\n badgeBackground: accentColor(\"warning\", 0.1),\n border: accentColor(\"warning\", 0.3),\n },\n attention: {\n foreground: accentColor(\"attention\"),\n background: accentColor(\"attention\", 0.1),\n badgeBackground: accentColor(\"attention\", 0.1),\n border: accentColor(\"attention\", 0.3),\n },\n danger: {\n foreground: themeColor(\"danger\"),\n background: themeColor(\"danger\", 0.1),\n badgeBackground: themeColor(\"danger\", 0.1),\n border: themeColor(\"danger\", 0.3),\n },\n },\n interaction: {\n hover: themeColor(\"text\", 0.06),\n focus: themeColor(\"contentBrand\", 0.08),\n pressed: themeColor(\"text\", 0.1),\n selected: themeColor(\"primary\", 0.1),\n },\n} as const;\n"]}
@@ -0,0 +1,51 @@
1
+ /** Why an open Sheet is being asked to close. */
2
+ export type SheetDismissReason = "close-action" | "escape" | "back" | "outside" | "swipe" | "programmatic";
3
+ /**
4
+ * `trigger` only opens a Sheet. Every close reports the concrete dismiss reason
5
+ * so renderers and product analytics do not have to infer it from platform events.
6
+ */
7
+ export type SheetOpenChangeDetails = Readonly<{
8
+ reason: "trigger" | SheetDismissReason;
9
+ }>;
10
+ /** User-dismiss policy. A controlled owner may always close programmatically. */
11
+ export type SheetDismissPolicy = Readonly<{
12
+ dismissible: boolean;
13
+ dismissWhileBusy: boolean;
14
+ outsideDismiss: boolean;
15
+ escapeOrBackDismiss: boolean;
16
+ swipeDismiss: boolean;
17
+ }>;
18
+ export type SheetOpenState = Readonly<{
19
+ open: boolean;
20
+ defaultOpen?: never;
21
+ onOpenChange(open: boolean, detail: SheetOpenChangeDetails): void;
22
+ }> | Readonly<{
23
+ open?: never;
24
+ defaultOpen?: boolean;
25
+ onOpenChange?: (open: boolean, detail: SheetOpenChangeDetails) => void;
26
+ }>;
27
+ export declare const sheetBehaviorDefaults: {
28
+ readonly dismissible: true;
29
+ readonly dismissWhileBusy: false;
30
+ readonly outsideDismiss: true;
31
+ readonly escapeOrBackDismiss: true;
32
+ readonly swipeDismiss: false;
33
+ };
34
+ /**
35
+ * Resolves an attempted close without platform knowledge. Programmatic close is
36
+ * intentionally an owner override: a controlled `open={false}` cannot be vetoed
37
+ * by a renderer, even while the Sheet is busy or not user-dismissible.
38
+ */
39
+ export declare function canDismissSheet(reason: SheetDismissReason, busy: boolean, policy?: SheetDismissPolicy): boolean;
40
+ export type SheetLifecycle = Readonly<{
41
+ open(): number;
42
+ beginDismiss(): number | null;
43
+ requestClose(reason: SheetDismissReason, busy: boolean, policy?: SheetDismissPolicy): boolean;
44
+ completeDismiss(cycle: number): boolean;
45
+ }>;
46
+ /**
47
+ * Makes persistent native Modal renderers settle each visible cycle once.
48
+ * Platform adapters still decide when native dismissal has actually completed.
49
+ */
50
+ export declare function createSheetLifecycle(initiallyVisible?: boolean): SheetLifecycle;
51
+ //# sourceMappingURL=sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../src/sheet.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACj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BAAkB,GAC1B,OAAO,CAAC;IACX,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,gBAAgB,UAAQ,GACvB,cAAc,CAgChB"}
package/dist/sheet.js ADDED
@@ -0,0 +1,69 @@
1
+ export const sheetBehaviorDefaults = {
2
+ dismissible: true,
3
+ dismissWhileBusy: false,
4
+ outsideDismiss: true,
5
+ escapeOrBackDismiss: true,
6
+ swipeDismiss: false,
7
+ };
8
+ /**
9
+ * Resolves an attempted close without platform knowledge. Programmatic close is
10
+ * intentionally an owner override: a controlled `open={false}` cannot be vetoed
11
+ * by a renderer, even while the Sheet is busy or not user-dismissible.
12
+ */
13
+ export function canDismissSheet(reason, busy, policy = sheetBehaviorDefaults) {
14
+ if (reason === "programmatic")
15
+ return true;
16
+ if (!policy.dismissible)
17
+ return false;
18
+ if (busy && !policy.dismissWhileBusy)
19
+ return false;
20
+ if (reason === "outside")
21
+ return policy.outsideDismiss;
22
+ if (reason === "escape" || reason === "back") {
23
+ return policy.escapeOrBackDismiss;
24
+ }
25
+ if (reason === "swipe")
26
+ return policy.swipeDismiss;
27
+ return true;
28
+ }
29
+ /**
30
+ * Makes persistent native Modal renderers settle each visible cycle once.
31
+ * Platform adapters still decide when native dismissal has actually completed.
32
+ */
33
+ export function createSheetLifecycle(initiallyVisible = false) {
34
+ let sequence = initiallyVisible ? 1 : 0;
35
+ let activeCycle = initiallyVisible ? sequence : null;
36
+ let closeRequested = false;
37
+ const dismissingCycles = new Set();
38
+ return {
39
+ open() {
40
+ if (activeCycle !== null)
41
+ return activeCycle;
42
+ sequence += 1;
43
+ activeCycle = sequence;
44
+ closeRequested = false;
45
+ return activeCycle;
46
+ },
47
+ beginDismiss() {
48
+ if (activeCycle === null)
49
+ return null;
50
+ const cycle = activeCycle;
51
+ activeCycle = null;
52
+ closeRequested = false;
53
+ dismissingCycles.add(cycle);
54
+ return cycle;
55
+ },
56
+ requestClose(reason, busy, policy = sheetBehaviorDefaults) {
57
+ if (activeCycle === null || closeRequested)
58
+ return false;
59
+ if (!canDismissSheet(reason, busy, policy))
60
+ return false;
61
+ closeRequested = true;
62
+ return true;
63
+ },
64
+ completeDismiss(cycle) {
65
+ return dismissingCycles.delete(cycle);
66
+ },
67
+ };
68
+ }
69
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","sourceRoot":"","sources":["../src/sheet.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,YAAY,EAAE,KAAK;CACkB,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,MAA0B,EAC1B,IAAa,EACb,SAA6B,qBAAqB;IAElD,IAAI,MAAM,KAAK,cAAc;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,CAAC,MAAM,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACnD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,cAAc,CAAC;IACvD,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,mBAAmB,CAAC;IACpC,CAAC;IACD,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,MAAM,CAAC,YAAY,CAAC;IACnD,OAAO,IAAI,CAAC;AACd,CAAC;AAaD;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,gBAAgB,GAAG,KAAK;IAExB,IAAI,QAAQ,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,IAAI,WAAW,GAAkB,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IACpE,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE3C,OAAO;QACL,IAAI;YACF,IAAI,WAAW,KAAK,IAAI;gBAAE,OAAO,WAAW,CAAC;YAC7C,QAAQ,IAAI,CAAC,CAAC;YACd,WAAW,GAAG,QAAQ,CAAC;YACvB,cAAc,GAAG,KAAK,CAAC;YACvB,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,YAAY;YACV,IAAI,WAAW,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YACtC,MAAM,KAAK,GAAG,WAAW,CAAC;YAC1B,WAAW,GAAG,IAAI,CAAC;YACnB,cAAc,GAAG,KAAK,CAAC;YACvB,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,qBAAqB;YACvD,IAAI,WAAW,KAAK,IAAI,IAAI,cAAc;gBAAE,OAAO,KAAK,CAAC;YACzD,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC;gBAAE,OAAO,KAAK,CAAC;YACzD,cAAc,GAAG,IAAI,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,eAAe,CAAC,KAAK;YACnB,OAAO,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/** Why an open Sheet is being asked to close. */\nexport type SheetDismissReason =\n | \"close-action\"\n | \"escape\"\n | \"back\"\n | \"outside\"\n | \"swipe\"\n | \"programmatic\";\n\n/**\n * `trigger` only opens a Sheet. Every close reports the concrete dismiss reason\n * so renderers and product analytics do not have to infer it from platform events.\n */\nexport type SheetOpenChangeDetails = Readonly<{\n reason: \"trigger\" | SheetDismissReason;\n}>;\n\n/** User-dismiss policy. A controlled owner may always close programmatically. */\nexport type SheetDismissPolicy = Readonly<{\n dismissible: boolean;\n dismissWhileBusy: boolean;\n outsideDismiss: boolean;\n escapeOrBackDismiss: boolean;\n swipeDismiss: boolean;\n}>;\n\nexport type SheetOpenState =\n | Readonly<{\n open: boolean;\n defaultOpen?: never;\n onOpenChange(open: boolean, detail: SheetOpenChangeDetails): void;\n }>\n | Readonly<{\n open?: never;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, detail: SheetOpenChangeDetails) => void;\n }>;\n\nexport const sheetBehaviorDefaults = {\n dismissible: true,\n dismissWhileBusy: false,\n outsideDismiss: true,\n escapeOrBackDismiss: true,\n swipeDismiss: false,\n} as const satisfies SheetDismissPolicy;\n\n/**\n * Resolves an attempted close without platform knowledge. Programmatic close is\n * intentionally an owner override: a controlled `open={false}` cannot be vetoed\n * by a renderer, even while the Sheet is busy or not user-dismissible.\n */\nexport function canDismissSheet(\n reason: SheetDismissReason,\n busy: boolean,\n policy: SheetDismissPolicy = sheetBehaviorDefaults,\n): boolean {\n if (reason === \"programmatic\") return true;\n if (!policy.dismissible) return false;\n if (busy && !policy.dismissWhileBusy) return false;\n if (reason === \"outside\") return policy.outsideDismiss;\n if (reason === \"escape\" || reason === \"back\") {\n return policy.escapeOrBackDismiss;\n }\n if (reason === \"swipe\") return policy.swipeDismiss;\n return true;\n}\n\nexport type SheetLifecycle = Readonly<{\n open(): number;\n beginDismiss(): number | null;\n requestClose(\n reason: SheetDismissReason,\n busy: boolean,\n policy?: SheetDismissPolicy,\n ): boolean;\n completeDismiss(cycle: number): boolean;\n}>;\n\n/**\n * Makes persistent native Modal renderers settle each visible cycle once.\n * Platform adapters still decide when native dismissal has actually completed.\n */\nexport function createSheetLifecycle(\n initiallyVisible = false,\n): SheetLifecycle {\n let sequence = initiallyVisible ? 1 : 0;\n let activeCycle: number | null = initiallyVisible ? sequence : null;\n let closeRequested = false;\n const dismissingCycles = new Set<number>();\n\n return {\n open() {\n if (activeCycle !== null) return activeCycle;\n sequence += 1;\n activeCycle = sequence;\n closeRequested = false;\n return activeCycle;\n },\n beginDismiss() {\n if (activeCycle === null) return null;\n const cycle = activeCycle;\n activeCycle = null;\n closeRequested = false;\n dismissingCycles.add(cycle);\n return cycle;\n },\n requestClose(reason, busy, policy = sheetBehaviorDefaults) {\n if (activeCycle === null || closeRequested) return false;\n if (!canDismissSheet(reason, busy, policy)) return false;\n closeRequested = true;\n return true;\n },\n completeDismiss(cycle) {\n return dismissingCycles.delete(cycle);\n },\n };\n}\n"]}
@@ -0,0 +1,153 @@
1
+ import { type ComponentCatalogEntry, type ComponentStatus, type ComponentSurfaceMaturity } from "./catalog.js";
2
+ import type { ResolvedTheme } from "./colors.js";
3
+ import type { DesignSystemDirection, DesignSystemEnvironmentInput } from "./design-system-provider.js";
4
+ export type ShowcaseTheme = ResolvedTheme;
5
+ export type ShowcaseDirection = DesignSystemDirection;
6
+ /** Closed fixture subset of the Provider's continuous text-scale signal. */
7
+ export type ShowcaseTextScale = 1 | 1.5 | 2;
8
+ export type ShowcaseMotionPreference = "full" | "reduced";
9
+ export type ShowcaseEnvironment = Readonly<{
10
+ id: "default" | "dark" | "large-text" | "rtl" | "reduced-motion";
11
+ label: string;
12
+ theme: ShowcaseTheme;
13
+ direction: ShowcaseDirection;
14
+ textScale: ShowcaseTextScale;
15
+ motion: ShowcaseMotionPreference;
16
+ }>;
17
+ /**
18
+ * A small, deliberate environment matrix catches the high-risk differences
19
+ * without multiplying every story into an unreadable Cartesian product.
20
+ */
21
+ export declare const showcaseEnvironmentMatrix: readonly [{
22
+ readonly id: "default";
23
+ readonly label: "Light · LTR · 100%";
24
+ readonly theme: "light";
25
+ readonly direction: "ltr";
26
+ readonly textScale: 1;
27
+ readonly motion: "full";
28
+ }, {
29
+ readonly id: "dark";
30
+ readonly label: "Dark · LTR · 100%";
31
+ readonly theme: "dark";
32
+ readonly direction: "ltr";
33
+ readonly textScale: 1;
34
+ readonly motion: "full";
35
+ }, {
36
+ readonly id: "large-text";
37
+ readonly label: "Light · LTR · 200%";
38
+ readonly theme: "light";
39
+ readonly direction: "ltr";
40
+ readonly textScale: 2;
41
+ readonly motion: "full";
42
+ }, {
43
+ readonly id: "rtl";
44
+ readonly label: "Light · RTL · 100%";
45
+ readonly theme: "light";
46
+ readonly direction: "rtl";
47
+ readonly textScale: 1;
48
+ readonly motion: "full";
49
+ }, {
50
+ readonly id: "reduced-motion";
51
+ readonly label: "Light · LTR · Reduced motion";
52
+ readonly theme: "light";
53
+ readonly direction: "ltr";
54
+ readonly textScale: 1;
55
+ readonly motion: "reduced";
56
+ }];
57
+ /** Bridges documentation fixtures to the same environment contract products consume. */
58
+ export declare function getShowcaseEnvironmentInput(environment: ShowcaseEnvironment): DesignSystemEnvironmentInput;
59
+ export type ShowcaseScenarioId = "contract" | "default" | "dark" | "long-copy" | "large-text" | "rtl" | "reduced-motion" | "accessibility" | "keyboard" | "platform-parity";
60
+ export type ShowcaseSurface = "contract" | "web" | "native";
61
+ export type ShowcaseScenario = Readonly<{
62
+ id: ShowcaseScenarioId;
63
+ label: string;
64
+ description: string;
65
+ }>;
66
+ export declare const showcaseScenarios: readonly [{
67
+ readonly id: "contract";
68
+ readonly label: "Contract";
69
+ readonly description: "Anatomy, defaults, supported axes, platform and maturity are visible.";
70
+ }, {
71
+ readonly id: "default";
72
+ readonly label: "Default";
73
+ readonly description: "The normal state renders using recipe defaults without product overrides.";
74
+ }, {
75
+ readonly id: "dark";
76
+ readonly label: "Dark";
77
+ readonly description: "Semantic colors remain legible on the dark theme.";
78
+ }, {
79
+ readonly id: "long-copy";
80
+ readonly label: "Long copy";
81
+ readonly description: "Long Korean and English copy wraps without clipping or hiding meaning.";
82
+ }, {
83
+ readonly id: "large-text";
84
+ readonly label: "200% text";
85
+ readonly description: "Text can grow to 200% without truncating required information.";
86
+ }, {
87
+ readonly id: "rtl";
88
+ readonly label: "RTL";
89
+ readonly description: "Logical start/end layout and directional icons mirror correctly.";
90
+ }, {
91
+ readonly id: "reduced-motion";
92
+ readonly label: "Reduced motion";
93
+ readonly description: "Motion follows the recipe reduced-motion fallback.";
94
+ }, {
95
+ readonly id: "accessibility";
96
+ readonly label: "Accessibility";
97
+ readonly description: "Names, states, relationships, contrast and touch targets are inspectable.";
98
+ }, {
99
+ readonly id: "keyboard";
100
+ readonly label: "Keyboard";
101
+ readonly description: "Focus order and documented keyboard behavior run as interaction tests.";
102
+ }, {
103
+ readonly id: "platform-parity";
104
+ readonly label: "Web / Native parity";
105
+ readonly description: "Adaptive renderers preserve intent while using platform-native behavior.";
106
+ }];
107
+ export type ShowcaseComponentEntry = Readonly<{
108
+ storyId: string;
109
+ component: ComponentCatalogEntry;
110
+ /** Resolved Web/Native renderer maturity, including legacy catalog inputs. */
111
+ surfaceMaturity: ComponentSurfaceMaturity;
112
+ requirements: readonly ShowcaseEvidenceRequirement[];
113
+ requiredScenarios: readonly ShowcaseScenarioId[];
114
+ requiredSurfaces: readonly ShowcaseSurface[];
115
+ }>;
116
+ export type ShowcaseEvidenceRequirement = Readonly<{
117
+ surface: ShowcaseSurface;
118
+ scenarios: readonly ShowcaseScenarioId[];
119
+ }>;
120
+ export type ShowcaseEvidenceEntry = Readonly<{
121
+ storyId: string;
122
+ surface: ShowcaseSurface;
123
+ scenarios: readonly ShowcaseScenarioId[];
124
+ }>;
125
+ export type ShowcaseCoverageEntry = Readonly<{
126
+ storyId: string;
127
+ component: ComponentCatalogEntry;
128
+ missingEvidence: readonly Readonly<{
129
+ surface: ShowcaseSurface;
130
+ scenario: ShowcaseScenarioId;
131
+ }>[];
132
+ missingSurfaces: readonly ShowcaseSurface[];
133
+ missingScenarios: readonly ShowcaseScenarioId[];
134
+ complete: boolean;
135
+ }>;
136
+ export declare function getShowcaseStoryId(entry: ComponentCatalogEntry): string;
137
+ export declare function getRequiredShowcaseScenarios(entry: ComponentCatalogEntry): readonly ShowcaseScenarioId[];
138
+ export declare function getRequiredShowcaseSurfaces(entry: ComponentCatalogEntry): readonly ShowcaseSurface[];
139
+ export declare function getRequiredShowcaseEvidence(entry: ComponentCatalogEntry): readonly ShowcaseEvidenceRequirement[];
140
+ export declare function createShowcaseManifest(entries?: readonly ComponentCatalogEntry[]): readonly ShowcaseComponentEntry[];
141
+ export declare const showcaseManifest: readonly Readonly<{
142
+ storyId: string;
143
+ component: ComponentCatalogEntry;
144
+ /** Resolved Web/Native renderer maturity, including legacy catalog inputs. */
145
+ surfaceMaturity: ComponentSurfaceMaturity;
146
+ requirements: readonly ShowcaseEvidenceRequirement[];
147
+ requiredScenarios: readonly ShowcaseScenarioId[];
148
+ requiredSurfaces: readonly ShowcaseSurface[];
149
+ }>[];
150
+ export declare function createShowcaseCoverage(evidence: readonly ShowcaseEvidenceEntry[], manifest?: readonly ShowcaseComponentEntry[]): readonly ShowcaseCoverageEntry[];
151
+ export declare function assertShowcaseCoverage(evidence: readonly ShowcaseEvidenceEntry[], manifest?: readonly ShowcaseComponentEntry[]): void;
152
+ export declare function summarizeShowcaseMaturity(entries?: readonly ComponentCatalogEntry[]): Readonly<Record<ComponentStatus, number>>;
153
+ //# sourceMappingURL=showcase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showcase.d.ts","sourceRoot":"","sources":["../src/showcase.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAEpB,KAAK,wBAAwB,EAE9B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAE7B,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAC1C,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AACtD,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,GAAG,GAA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