@tempoxyz/ds 0.3.10 → 0.3.13

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 (210) hide show
  1. package/README.md +7 -6
  2. package/dist/docs/AGENTS.md +12 -0
  3. package/dist/docs/index.md +145 -0
  4. package/dist/docs/marketing/introduction/getting-started.md +241 -0
  5. package/dist/docs/product/components/accordion.md +489 -0
  6. package/dist/docs/product/components/address-card.md +147 -0
  7. package/dist/docs/product/components/agent-logo.md +194 -0
  8. package/dist/docs/product/components/alert-dialog.md +631 -0
  9. package/dist/docs/product/components/alert.md +448 -0
  10. package/dist/docs/product/components/amount-input.md +305 -0
  11. package/dist/docs/product/components/amount.md +794 -0
  12. package/dist/docs/product/components/app-shell.md +559 -0
  13. package/dist/docs/product/components/asset-chip.md +294 -0
  14. package/dist/docs/product/components/autocomplete.md +620 -0
  15. package/dist/docs/product/components/avatar.md +321 -0
  16. package/dist/docs/product/components/badge.md +339 -0
  17. package/dist/docs/product/components/badged-logo.md +116 -0
  18. package/dist/docs/product/components/banner.md +379 -0
  19. package/dist/docs/product/components/bar-chart.md +208 -0
  20. package/dist/docs/product/components/breadcrumbs.md +380 -0
  21. package/dist/docs/product/components/button-group.md +286 -0
  22. package/dist/docs/product/components/button.md +650 -0
  23. package/dist/docs/product/components/calendar.md +375 -0
  24. package/dist/docs/product/components/callout.md +96 -0
  25. package/dist/docs/product/components/checkbox-group.md +521 -0
  26. package/dist/docs/product/components/checkbox.md +467 -0
  27. package/dist/docs/product/components/choice-group.md +516 -0
  28. package/dist/docs/product/components/choicebox.md +641 -0
  29. package/dist/docs/product/components/code.md +100 -0
  30. package/dist/docs/product/components/combobox.md +939 -0
  31. package/dist/docs/product/components/container.md +257 -0
  32. package/dist/docs/product/components/copy-button.md +642 -0
  33. package/dist/docs/product/components/date-picker.md +514 -0
  34. package/dist/docs/product/components/dialog.md +1332 -0
  35. package/dist/docs/product/components/drawer.md +966 -0
  36. package/dist/docs/product/components/empty.md +340 -0
  37. package/dist/docs/product/components/field.md +570 -0
  38. package/dist/docs/product/components/fieldset.md +398 -0
  39. package/dist/docs/product/components/frame.md +434 -0
  40. package/dist/docs/product/components/gauge.md +299 -0
  41. package/dist/docs/product/components/get-started-visual.md +117 -0
  42. package/dist/docs/product/components/grid.md +288 -0
  43. package/dist/docs/product/components/hero-visual.md +155 -0
  44. package/dist/docs/product/components/hex.md +487 -0
  45. package/dist/docs/product/components/icon-tile.md +292 -0
  46. package/dist/docs/product/components/identicon.md +371 -0
  47. package/dist/docs/product/components/inline.md +233 -0
  48. package/dist/docs/product/components/inset.md +225 -0
  49. package/dist/docs/product/components/kbd.md +423 -0
  50. package/dist/docs/product/components/list-group.md +981 -0
  51. package/dist/docs/product/components/loading-dots.md +237 -0
  52. package/dist/docs/product/components/menu.md +934 -0
  53. package/dist/docs/product/components/native-select.md +204 -0
  54. package/dist/docs/product/components/network-logo.md +248 -0
  55. package/dist/docs/product/components/number-field.md +543 -0
  56. package/dist/docs/product/components/otp-field.md +616 -0
  57. package/dist/docs/product/components/pagination.md +516 -0
  58. package/dist/docs/product/components/popover.md +544 -0
  59. package/dist/docs/product/components/progress.md +388 -0
  60. package/dist/docs/product/components/qr.md +314 -0
  61. package/dist/docs/product/components/radio-group.md +528 -0
  62. package/dist/docs/product/components/secret-value.md +406 -0
  63. package/dist/docs/product/components/select.md +751 -0
  64. package/dist/docs/product/components/separator.md +379 -0
  65. package/dist/docs/product/components/sidebar-menu.md +922 -0
  66. package/dist/docs/product/components/skeleton.md +517 -0
  67. package/dist/docs/product/components/slider.md +539 -0
  68. package/dist/docs/product/components/snippet.md +424 -0
  69. package/dist/docs/product/components/spinner.md +216 -0
  70. package/dist/docs/product/components/split-bar.md +139 -0
  71. package/dist/docs/product/components/split-button.md +464 -0
  72. package/dist/docs/product/components/stack.md +299 -0
  73. package/dist/docs/product/components/status-chip.md +226 -0
  74. package/dist/docs/product/components/status-indicator.md +119 -0
  75. package/dist/docs/product/components/status-row.md +174 -0
  76. package/dist/docs/product/components/stepper.md +451 -0
  77. package/dist/docs/product/components/success-hero.md +157 -0
  78. package/dist/docs/product/components/surface.md +639 -0
  79. package/dist/docs/product/components/switch.md +472 -0
  80. package/dist/docs/product/components/table.md +967 -0
  81. package/dist/docs/product/components/tabs.md +627 -0
  82. package/dist/docs/product/components/tempo-logo.md +185 -0
  83. package/dist/docs/product/components/text-input.md +624 -0
  84. package/dist/docs/product/components/textarea.md +352 -0
  85. package/dist/docs/product/components/toast.md +535 -0
  86. package/dist/docs/product/components/token-logo.md +371 -0
  87. package/dist/docs/product/components/token.md +247 -0
  88. package/dist/docs/product/components/tooltip.md +490 -0
  89. package/dist/docs/product/components/verification-code.md +116 -0
  90. package/dist/docs/product/components/visual.md +249 -0
  91. package/dist/docs/product/components.md +203 -0
  92. package/dist/docs/product/foundations/accessibility.md +377 -0
  93. package/dist/docs/product/foundations/agents.md +150 -0
  94. package/dist/docs/product/foundations/color.md +522 -0
  95. package/dist/docs/product/foundations/content/tone.md +194 -0
  96. package/dist/docs/product/foundations/content/voice.md +194 -0
  97. package/dist/docs/product/foundations/content/writing-style.md +406 -0
  98. package/dist/docs/product/foundations/iconography.md +282 -0
  99. package/dist/docs/product/foundations/intent.md +360 -0
  100. package/dist/docs/product/foundations/layout.md +508 -0
  101. package/dist/docs/product/foundations/linter.md +496 -0
  102. package/dist/docs/product/foundations/motion.md +151 -0
  103. package/dist/docs/product/foundations/radius-and-padding.md +86 -0
  104. package/dist/docs/product/foundations/typography.md +266 -0
  105. package/dist/docs/product/introduction/faq.md +133 -0
  106. package/dist/docs/product/introduction/getting-started.md +377 -0
  107. package/dist/docs/product/patterns/blockchain-values.md +709 -0
  108. package/dist/docs/product/patterns/dashboards.md +638 -0
  109. package/dist/docs/product/patterns/destructive-actions.md +626 -0
  110. package/dist/docs/product/patterns/empty-states.md +612 -0
  111. package/dist/docs/product/patterns/errors-and-validation.md +808 -0
  112. package/dist/docs/product/patterns/feedback-and-status.md +518 -0
  113. package/dist/docs/product/patterns/forms.md +679 -0
  114. package/dist/docs/product/patterns/loading.md +630 -0
  115. package/dist/docs/product/patterns/navigation.md +397 -0
  116. package/dist/docs/product/patterns/payments.md +765 -0
  117. package/dist/docs/product/patterns/responsive-layout.md +997 -0
  118. package/dist/docs/product/patterns/tables-and-lists.md +964 -0
  119. package/dist/docs/product/products/tempo-console.md +671 -0
  120. package/dist/docs/product/products/tempo-performance.md +437 -0
  121. package/dist/docs/product/products/tempo-wallet.md +438 -0
  122. package/dist/marketing/index.d.ts +4 -0
  123. package/dist/marketing/index.d.ts.map +1 -0
  124. package/dist/marketing/index.js +4 -0
  125. package/dist/marketing/index.js.map +1 -0
  126. package/dist/marketing/index.js.zyzz.json +1 -0
  127. package/dist/marketing/vars.d.ts +907 -0
  128. package/dist/marketing/vars.d.ts.map +1 -0
  129. package/dist/marketing/vars.js +15 -0
  130. package/dist/marketing/vars.js.map +1 -0
  131. package/dist/marketing/vars.js.zyzz.json +1 -0
  132. package/dist/marketing/zyzz.config.d.ts +4512 -0
  133. package/dist/marketing/zyzz.config.d.ts.map +1 -0
  134. package/dist/marketing/zyzz.config.js +63 -0
  135. package/dist/marketing/zyzz.config.js.map +1 -0
  136. package/dist/marketing/zyzz.config.js.zyzz.json +1 -0
  137. package/dist/oxlint/index.d.ts +12 -1
  138. package/dist/oxlint/index.d.ts.map +1 -1
  139. package/dist/oxlint/index.js +39 -1
  140. package/dist/oxlint/index.js.map +1 -1
  141. package/dist/oxlint/internal/Docs.d.ts +9 -0
  142. package/dist/oxlint/internal/Docs.d.ts.map +1 -0
  143. package/dist/oxlint/internal/Docs.js +15 -0
  144. package/dist/oxlint/internal/Docs.js.map +1 -0
  145. package/dist/oxlint/internal/Imports.d.ts +1 -1
  146. package/dist/oxlint/internal/Imports.d.ts.map +1 -1
  147. package/dist/oxlint/internal/Imports.js +2 -0
  148. package/dist/oxlint/internal/Imports.js.map +1 -1
  149. package/dist/oxlint/internal/Styles.d.ts +40 -0
  150. package/dist/oxlint/internal/Styles.d.ts.map +1 -0
  151. package/dist/oxlint/internal/Styles.js +194 -0
  152. package/dist/oxlint/internal/Styles.js.map +1 -0
  153. package/dist/oxlint/internal/Tokens.d.ts +16 -0
  154. package/dist/oxlint/internal/Tokens.d.ts.map +1 -0
  155. package/dist/oxlint/internal/Tokens.js +39 -0
  156. package/dist/oxlint/internal/Tokens.js.map +1 -0
  157. package/dist/oxlint/rules/NoCrossSurface.d.ts +2 -2
  158. package/dist/oxlint/rules/NoCrossSurface.js +3 -3
  159. package/dist/oxlint/rules/NoCrossSurface.js.map +1 -1
  160. package/dist/oxlint/rules/NoCustomValues.d.ts +11 -0
  161. package/dist/oxlint/rules/NoCustomValues.d.ts.map +1 -0
  162. package/dist/oxlint/rules/NoCustomValues.js +150 -0
  163. package/dist/oxlint/rules/NoCustomValues.js.map +1 -0
  164. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts +11 -0
  165. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts.map +1 -0
  166. package/dist/oxlint/rules/NoSingleKeyShortcuts.js +158 -0
  167. package/dist/oxlint/rules/NoSingleKeyShortcuts.js.map +1 -0
  168. package/dist/oxlint/rules/PreferComponent.d.ts +3 -2
  169. package/dist/oxlint/rules/PreferComponent.d.ts.map +1 -1
  170. package/dist/oxlint/rules/PreferComponent.js +11 -4
  171. package/dist/oxlint/rules/PreferComponent.js.map +1 -1
  172. package/dist/oxlint/rules/PreferLayout.d.ts +9 -0
  173. package/dist/oxlint/rules/PreferLayout.d.ts.map +1 -0
  174. package/dist/oxlint/rules/PreferLayout.js +90 -0
  175. package/dist/oxlint/rules/PreferLayout.js.map +1 -0
  176. package/dist/oxlint/rules/PreferProgress.d.ts +9 -0
  177. package/dist/oxlint/rules/PreferProgress.d.ts.map +1 -0
  178. package/dist/oxlint/rules/PreferProgress.js +43 -0
  179. package/dist/oxlint/rules/PreferProgress.js.map +1 -0
  180. package/dist/oxlint/rules/PreferSurface.d.ts +9 -0
  181. package/dist/oxlint/rules/PreferSurface.d.ts.map +1 -0
  182. package/dist/oxlint/rules/PreferSurface.js +55 -0
  183. package/dist/oxlint/rules/PreferSurface.js.map +1 -0
  184. package/dist/oxlint/rules/RequireAccessibleName.d.ts.map +1 -1
  185. package/dist/oxlint/rules/RequireAccessibleName.js +3 -1
  186. package/dist/oxlint/rules/RequireAccessibleName.js.map +1 -1
  187. package/dist/oxlint/rules/RequireScrollRegion.d.ts +11 -0
  188. package/dist/oxlint/rules/RequireScrollRegion.d.ts.map +1 -0
  189. package/dist/oxlint/rules/RequireScrollRegion.js +71 -0
  190. package/dist/oxlint/rules/RequireScrollRegion.js.map +1 -0
  191. package/dist/web/icons/index.js.zyzz.json +1 -0
  192. package/package.json +6 -1
  193. package/src/marketing/README.md +21 -0
  194. package/src/marketing/index.ts +3 -0
  195. package/src/marketing/vars.ts +751 -0
  196. package/src/marketing/zyzz.config.ts +376 -0
  197. package/src/oxlint/index.ts +40 -1
  198. package/src/oxlint/internal/Docs.ts +18 -0
  199. package/src/oxlint/internal/Imports.ts +2 -1
  200. package/src/oxlint/internal/Styles.ts +240 -0
  201. package/src/oxlint/internal/Tokens.ts +43 -0
  202. package/src/oxlint/rules/NoCrossSurface.ts +3 -3
  203. package/src/oxlint/rules/NoCustomValues.ts +170 -0
  204. package/src/oxlint/rules/NoSingleKeyShortcuts.ts +190 -0
  205. package/src/oxlint/rules/PreferComponent.ts +11 -4
  206. package/src/oxlint/rules/PreferLayout.ts +96 -0
  207. package/src/oxlint/rules/PreferProgress.ts +49 -0
  208. package/src/oxlint/rules/PreferSurface.ts +70 -0
  209. package/src/oxlint/rules/RequireAccessibleName.ts +3 -1
  210. package/src/oxlint/rules/RequireScrollRegion.ts +92 -0
@@ -0,0 +1,376 @@
1
+ import { Config } from 'zyzz'
2
+ import { fontFace, global } from 'zyzz/web'
3
+ import { variables } from './vars.js'
4
+
5
+ /**
6
+ * Zyzz authoring helpers bound to the Marketing variables, so token strings such as
7
+ * `content.primary`, `'6'` and `body.b2` type-check and compile ahead of time.
8
+ *
9
+ * - `style(definition)` returns a callable that produces `className` and `style` props.
10
+ * - `variants({ base, variants, defaultVariants })` returns a callable that takes the variant
11
+ * selection.
12
+ * - `vars` holds references such as `vars.ease.snappy`. Call `vars({ colorScheme })` for props
13
+ * that apply the variables, and optionally a color scheme, to a scope.
14
+ *
15
+ * @example
16
+ * namespace styles {
17
+ * export const panel = style({ backgroundColor: 'background.elevated', padding: '24' })
18
+ * }
19
+ *
20
+ * <section {...styles.panel()} />
21
+ */
22
+ export const { style, variants, vars } = Config.create({
23
+ cssOutput: 'atomic',
24
+ id: 'tds/marketing',
25
+ // React Native's axis shorthands. Zyzz reads config options as literal data, so each config repeats them.
26
+ shorthands: {
27
+ marginHorizontal: ['marginLeft', 'marginRight'],
28
+ marginVertical: ['marginTop', 'marginBottom'],
29
+ paddingHorizontal: ['paddingLeft', 'paddingRight'],
30
+ paddingVertical: ['paddingTop', 'paddingBottom'],
31
+ },
32
+ vars: variables,
33
+ })
34
+
35
+ // Inter's subsets, written by `scripts/subset-fonts.ts`. A browser downloads only the subsets whose
36
+ // `unicodeRange` the page's text uses, and a face declared later takes precedence where ranges
37
+ // overlap, so the order is intentional: `symbols` first and `latin` last, as Google Fonts orders them.
38
+ fontFace({
39
+ fontDisplay: 'swap',
40
+ fontFamily: 'Inter',
41
+ fontStyle: 'normal',
42
+ fontWeight: '100 900',
43
+ src: "url('../fonts/Inter-symbols.woff2') format('woff2')",
44
+ unicodeRange:
45
+ 'U+02CD-036F,U+0E3F,U+1DC0-1DFF,U+2070-2298,U+2303-232B,U+2380-238B,U+23CE-23CF,U+2423-2468,U+24B6-24EA,U+25A0-26A0,U+2713-2788,U+27EF-27FA,U+2913,U+2A38,U+2B06-2B24,U+2E18,U+A92E,U+E000-E163,U+E1C3-E2DC,U+EE01-EEE1,U+F6C3,U+1F12F-1F16B,U+1F850-1F852',
46
+ })
47
+
48
+ fontFace({
49
+ fontDisplay: 'swap',
50
+ fontFamily: 'Inter',
51
+ fontStyle: 'normal',
52
+ fontWeight: '100 900',
53
+ src: "url('../fonts/Inter-cyrillic-ext.woff2') format('woff2')",
54
+ unicodeRange: 'U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F',
55
+ })
56
+
57
+ fontFace({
58
+ fontDisplay: 'swap',
59
+ fontFamily: 'Inter',
60
+ fontStyle: 'normal',
61
+ fontWeight: '100 900',
62
+ src: "url('../fonts/Inter-cyrillic.woff2') format('woff2')",
63
+ unicodeRange: 'U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116',
64
+ })
65
+
66
+ fontFace({
67
+ fontDisplay: 'swap',
68
+ fontFamily: 'Inter',
69
+ fontStyle: 'normal',
70
+ fontWeight: '100 900',
71
+ src: "url('../fonts/Inter-greek-ext.woff2') format('woff2')",
72
+ unicodeRange: 'U+1F00-1FFF',
73
+ })
74
+
75
+ fontFace({
76
+ fontDisplay: 'swap',
77
+ fontFamily: 'Inter',
78
+ fontStyle: 'normal',
79
+ fontWeight: '100 900',
80
+ src: "url('../fonts/Inter-greek.woff2') format('woff2')",
81
+ unicodeRange: 'U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF',
82
+ })
83
+
84
+ fontFace({
85
+ fontDisplay: 'swap',
86
+ fontFamily: 'Inter',
87
+ fontStyle: 'normal',
88
+ fontWeight: '100 900',
89
+ src: "url('../fonts/Inter-vietnamese.woff2') format('woff2')",
90
+ unicodeRange:
91
+ 'U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB',
92
+ })
93
+
94
+ fontFace({
95
+ fontDisplay: 'swap',
96
+ fontFamily: 'Inter',
97
+ fontStyle: 'normal',
98
+ fontWeight: '100 900',
99
+ src: "url('../fonts/Inter-latin-ext.woff2') format('woff2')",
100
+ unicodeRange:
101
+ 'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF',
102
+ })
103
+
104
+ fontFace({
105
+ fontDisplay: 'swap',
106
+ fontFamily: 'Inter',
107
+ fontStyle: 'normal',
108
+ fontWeight: '100 900',
109
+ src: "url('../fonts/Inter-latin.woff2') format('woff2')",
110
+ unicodeRange:
111
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
112
+ })
113
+
114
+ // The JetBrains Mono and Pilat subsets, also written by `scripts/subset-fonts.ts`. Each weight has a
115
+ // `latin` subset with Inter's Latin range and an `other` subset with every other character. The
116
+ // `latin` face is declared after the `other` face, so it takes precedence where their ranges overlap.
117
+ fontFace({
118
+ fontDisplay: 'swap',
119
+ fontFamily: 'JetBrains Mono',
120
+ fontStyle: 'normal',
121
+ fontWeight: 400,
122
+ src: "url('../fonts/JetBrainsMono-Regular-other.woff2') format('woff2')",
123
+ unicodeRange:
124
+ 'U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B',
125
+ })
126
+
127
+ fontFace({
128
+ fontDisplay: 'swap',
129
+ fontFamily: 'JetBrains Mono',
130
+ fontStyle: 'normal',
131
+ fontWeight: 400,
132
+ src: "url('../fonts/JetBrainsMono-Regular-latin.woff2') format('woff2')",
133
+ unicodeRange:
134
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
135
+ })
136
+
137
+ fontFace({
138
+ fontDisplay: 'swap',
139
+ fontFamily: 'JetBrains Mono',
140
+ fontStyle: 'normal',
141
+ fontWeight: 500,
142
+ src: "url('../fonts/JetBrainsMono-Medium-other.woff2') format('woff2')",
143
+ unicodeRange:
144
+ 'U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B',
145
+ })
146
+
147
+ fontFace({
148
+ fontDisplay: 'swap',
149
+ fontFamily: 'JetBrains Mono',
150
+ fontStyle: 'normal',
151
+ fontWeight: 500,
152
+ src: "url('../fonts/JetBrainsMono-Medium-latin.woff2') format('woff2')",
153
+ unicodeRange:
154
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
155
+ })
156
+
157
+ fontFace({
158
+ fontDisplay: 'swap',
159
+ fontFamily: 'JetBrains Mono',
160
+ fontStyle: 'normal',
161
+ fontWeight: 600,
162
+ src: "url('../fonts/JetBrainsMono-SemiBold-other.woff2') format('woff2')",
163
+ unicodeRange:
164
+ 'U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B',
165
+ })
166
+
167
+ fontFace({
168
+ fontDisplay: 'swap',
169
+ fontFamily: 'JetBrains Mono',
170
+ fontStyle: 'normal',
171
+ fontWeight: 600,
172
+ src: "url('../fonts/JetBrainsMono-SemiBold-latin.woff2') format('woff2')",
173
+ unicodeRange:
174
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
175
+ })
176
+
177
+ fontFace({
178
+ fontDisplay: 'swap',
179
+ fontFamily: 'JetBrains Mono',
180
+ fontStyle: 'normal',
181
+ fontWeight: 700,
182
+ src: "url('../fonts/JetBrainsMono-Bold-other.woff2') format('woff2')",
183
+ unicodeRange:
184
+ 'U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B',
185
+ })
186
+
187
+ fontFace({
188
+ fontDisplay: 'swap',
189
+ fontFamily: 'JetBrains Mono',
190
+ fontStyle: 'normal',
191
+ fontWeight: 700,
192
+ src: "url('../fonts/JetBrainsMono-Bold-latin.woff2') format('woff2')",
193
+ unicodeRange:
194
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
195
+ })
196
+
197
+ fontFace({
198
+ fontDisplay: 'swap',
199
+ fontFamily: 'Pilat',
200
+ fontStyle: 'normal',
201
+ fontWeight: 100,
202
+ src: "url('../fonts/Pilat-Thin-other.woff2') format('woff2')",
203
+ unicodeRange:
204
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
205
+ })
206
+
207
+ fontFace({
208
+ fontDisplay: 'swap',
209
+ fontFamily: 'Pilat',
210
+ fontStyle: 'normal',
211
+ fontWeight: 100,
212
+ src: "url('../fonts/Pilat-Thin-latin.woff2') format('woff2')",
213
+ unicodeRange:
214
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
215
+ })
216
+
217
+ fontFace({
218
+ fontDisplay: 'swap',
219
+ fontFamily: 'Pilat',
220
+ fontStyle: 'normal',
221
+ fontWeight: 300,
222
+ src: "url('../fonts/Pilat-Light-other.woff2') format('woff2')",
223
+ unicodeRange:
224
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
225
+ })
226
+
227
+ fontFace({
228
+ fontDisplay: 'swap',
229
+ fontFamily: 'Pilat',
230
+ fontStyle: 'normal',
231
+ fontWeight: 300,
232
+ src: "url('../fonts/Pilat-Light-latin.woff2') format('woff2')",
233
+ unicodeRange:
234
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
235
+ })
236
+
237
+ fontFace({
238
+ fontDisplay: 'swap',
239
+ fontFamily: 'Pilat',
240
+ fontStyle: 'normal',
241
+ fontWeight: 400,
242
+ src: "url('../fonts/Pilat-Regular-other.woff2') format('woff2')",
243
+ unicodeRange:
244
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
245
+ })
246
+
247
+ fontFace({
248
+ fontDisplay: 'swap',
249
+ fontFamily: 'Pilat',
250
+ fontStyle: 'normal',
251
+ fontWeight: 400,
252
+ src: "url('../fonts/Pilat-Regular-latin.woff2') format('woff2')",
253
+ unicodeRange:
254
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
255
+ })
256
+
257
+ fontFace({
258
+ fontDisplay: 'swap',
259
+ fontFamily: 'Pilat',
260
+ fontStyle: 'normal',
261
+ fontWeight: 500,
262
+ src: "url('../fonts/Pilat-Book-other.woff2') format('woff2')",
263
+ unicodeRange:
264
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
265
+ })
266
+
267
+ fontFace({
268
+ fontDisplay: 'swap',
269
+ fontFamily: 'Pilat',
270
+ fontStyle: 'normal',
271
+ fontWeight: 500,
272
+ src: "url('../fonts/Pilat-Book-latin.woff2') format('woff2')",
273
+ unicodeRange:
274
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
275
+ })
276
+
277
+ fontFace({
278
+ fontDisplay: 'swap',
279
+ fontFamily: 'Pilat',
280
+ fontStyle: 'normal',
281
+ fontWeight: 600,
282
+ src: "url('../fonts/Pilat-Demi-other.woff2') format('woff2')",
283
+ unicodeRange:
284
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
285
+ })
286
+
287
+ fontFace({
288
+ fontDisplay: 'swap',
289
+ fontFamily: 'Pilat',
290
+ fontStyle: 'normal',
291
+ fontWeight: 600,
292
+ src: "url('../fonts/Pilat-Demi-latin.woff2') format('woff2')",
293
+ unicodeRange:
294
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
295
+ })
296
+
297
+ fontFace({
298
+ fontDisplay: 'swap',
299
+ fontFamily: 'Pilat',
300
+ fontStyle: 'normal',
301
+ fontWeight: 700,
302
+ src: "url('../fonts/Pilat-Bold-other.woff2') format('woff2')",
303
+ unicodeRange:
304
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
305
+ })
306
+
307
+ fontFace({
308
+ fontDisplay: 'swap',
309
+ fontFamily: 'Pilat',
310
+ fontStyle: 'normal',
311
+ fontWeight: 700,
312
+ src: "url('../fonts/Pilat-Bold-latin.woff2') format('woff2')",
313
+ unicodeRange:
314
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
315
+ })
316
+
317
+ fontFace({
318
+ fontDisplay: 'swap',
319
+ fontFamily: 'Pilat',
320
+ fontStyle: 'normal',
321
+ fontWeight: 800,
322
+ src: "url('../fonts/Pilat-Heavy-other.woff2') format('woff2')",
323
+ unicodeRange:
324
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
325
+ })
326
+
327
+ fontFace({
328
+ fontDisplay: 'swap',
329
+ fontFamily: 'Pilat',
330
+ fontStyle: 'normal',
331
+ fontWeight: 800,
332
+ src: "url('../fonts/Pilat-Heavy-latin.woff2') format('woff2')",
333
+ unicodeRange:
334
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
335
+ })
336
+
337
+ fontFace({
338
+ fontDisplay: 'swap',
339
+ fontFamily: 'Pilat',
340
+ fontStyle: 'normal',
341
+ fontWeight: 900,
342
+ src: "url('../fonts/Pilat-Black-other.woff2') format('woff2')",
343
+ unicodeRange:
344
+ 'U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00',
345
+ })
346
+
347
+ fontFace({
348
+ fontDisplay: 'swap',
349
+ fontFamily: 'Pilat',
350
+ fontStyle: 'normal',
351
+ fontWeight: 900,
352
+ src: "url('../fonts/Pilat-Black-latin.woff2') format('woff2')",
353
+ unicodeRange:
354
+ 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
355
+ })
356
+
357
+ global({
358
+ // Squircles at 1.84 times the radius meet the 45 degree point of a round corner, which is where
359
+ // the designs' fully smoothed corners pass. Browsers without `corner-shape` skip the block.
360
+ // Pseudo-elements usually paint a state layer over their element, so they take its shape.
361
+ '@supports (corner-shape: squircle)': {
362
+ ':root': { '--tds-corner-scale': '1.84' },
363
+ ':where(*)': { cornerShape: 'squircle' },
364
+ ':where(*)::after, :where(*)::before': { cornerShape: 'inherit' },
365
+ },
366
+ body: {
367
+ WebkitFontSmoothing: 'antialiased',
368
+ MozOsxFontSmoothing: 'grayscale',
369
+ color: vars.color.content.secondary,
370
+ fontFamily: vars.typography.body.b1.fontFamily,
371
+ fontSize: vars.typography.body.b1.fontSize,
372
+ fontWeight: vars.typography.body.b1.fontWeight,
373
+ letterSpacing: vars.typography.body.b1.letterSpacing,
374
+ lineHeight: vars.typography.body.b1.lineHeight,
375
+ },
376
+ })
@@ -1,10 +1,16 @@
1
1
  /** Oxlint plugin and configurations that check how an app uses `@tempoxyz/ds`. @module */
2
2
  import type { Plugin } from '@oxlint/plugins'
3
3
  import * as NoCrossSurface from './rules/NoCrossSurface.ts'
4
+ import * as NoCustomValues from './rules/NoCustomValues.ts'
4
5
  import * as NoInternalImports from './rules/NoInternalImports.ts'
5
6
  import * as NoRawValues from './rules/NoRawValues.ts'
7
+ import * as NoSingleKeyShortcuts from './rules/NoSingleKeyShortcuts.ts'
6
8
  import * as PreferComponent from './rules/PreferComponent.ts'
9
+ import * as PreferLayout from './rules/PreferLayout.ts'
10
+ import * as PreferProgress from './rules/PreferProgress.ts'
11
+ import * as PreferSurface from './rules/PreferSurface.ts'
7
12
  import * as RequireAccessibleName from './rules/RequireAccessibleName.ts'
13
+ import * as RequireScrollRegion from './rules/RequireScrollRegion.ts'
8
14
 
9
15
  /** An Oxlint rule severity. */
10
16
  export type Severity = 'error' | 'off' | 'warn'
@@ -31,6 +37,27 @@ const zyzz: Config['rules'] = {
31
37
  'zyzz/valid-styles': 'error',
32
38
  }
33
39
 
40
+ /**
41
+ * Enables the TDS and Zyzz rules for a marketing site that renders `@tempoxyz/ds/marketing`.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { marketing } from '@tempoxyz/ds/oxlint'
46
+ *
47
+ * export default defineConfig({ lint: marketing })
48
+ * ```
49
+ */
50
+ export const marketing: Config = {
51
+ jsPlugins: plugins,
52
+ rules: {
53
+ 'tds/no-cross-surface': ['error', { surface: 'marketing' }],
54
+ 'tds/no-internal-imports': 'error',
55
+ 'tds/no-raw-values': 'warn',
56
+ 'tds/require-accessible-name': 'error',
57
+ ...zyzz,
58
+ },
59
+ }
60
+
34
61
  /**
35
62
  * Enables the TDS and Zyzz rules for an app that renders `@tempoxyz/ds/mobile`.
36
63
  *
@@ -66,23 +93,35 @@ export const web: Config = {
66
93
  jsPlugins: plugins,
67
94
  rules: {
68
95
  'tds/no-cross-surface': ['error', { surface: 'web' }],
96
+ 'tds/no-custom-values': 'warn',
69
97
  'tds/no-internal-imports': 'error',
70
98
  'tds/no-raw-values': 'warn',
99
+ 'tds/no-single-key-shortcuts': 'warn',
71
100
  'tds/prefer-component': 'warn',
101
+ 'tds/prefer-layout': 'warn',
102
+ 'tds/prefer-progress': 'warn',
103
+ 'tds/prefer-surface': 'warn',
72
104
  'tds/require-accessible-name': 'error',
105
+ 'tds/require-scroll-region': 'warn',
73
106
  ...zyzz,
74
107
  },
75
108
  }
76
109
 
77
- /** Register through `jsPlugins` as `tds`, then enable `tds/*` rules or spread `web` or `mobile`. */
110
+ /** Register through `jsPlugins` as `tds`, then enable `tds/*` rules or spread `web`, `mobile`, or `marketing`. */
78
111
  const plugin: Plugin = {
79
112
  meta: { name: 'tds' },
80
113
  rules: {
81
114
  'no-cross-surface': NoCrossSurface.rule,
115
+ 'no-custom-values': NoCustomValues.rule,
82
116
  'no-internal-imports': NoInternalImports.rule,
83
117
  'no-raw-values': NoRawValues.rule,
118
+ 'no-single-key-shortcuts': NoSingleKeyShortcuts.rule,
84
119
  'prefer-component': PreferComponent.rule,
120
+ 'prefer-layout': PreferLayout.rule,
121
+ 'prefer-progress': PreferProgress.rule,
122
+ 'prefer-surface': PreferSurface.rule,
85
123
  'require-accessible-name': RequireAccessibleName.rule,
124
+ 'require-scroll-region': RequireScrollRegion.rule,
86
125
  },
87
126
  }
88
127
 
@@ -0,0 +1,18 @@
1
+ /** Builds links to the Tempo Design System docs that lint messages cite. @module */
2
+
3
+ const origin = 'https://ds.tehq.dev/product'
4
+
5
+ /**
6
+ * Returns the docs page of a component, such as `https://ds.tehq.dev/product/components/list-group`
7
+ * for `ListGroup`. A part, such as `ListGroup.Meter`, links the page of its component.
8
+ */
9
+ export function component(name: string): string {
10
+ const [head = name] = name.split('.')
11
+
12
+ return `${origin}/components/${head.replace(/(?<=[\da-z])(?=[A-Z])/g, '-').toLowerCase()}`
13
+ }
14
+
15
+ /** Returns a docs page by its path under `/product`, such as `foundations/layout#spacing`. */
16
+ export function page(path: string): string {
17
+ return `${origin}/${path}`
18
+ }
@@ -3,7 +3,7 @@ import type { ESTree, Visitor } from '@oxlint/plugins'
3
3
  import * as Module from 'node:module'
4
4
 
5
5
  /** A library surface, named after the entrypoint that ships it. */
6
- export type Surface = 'mobile' | 'web'
6
+ export type Surface = 'marketing' | 'mobile' | 'web'
7
7
 
8
8
  // The manifest sits three levels up from both `src/oxlint/internal` and `dist/oxlint/internal`.
9
9
  const manifest: { exports: Record<string, unknown>; name: string } = Module.createRequire(
@@ -29,6 +29,7 @@ export function surface(source: string): Surface | undefined {
29
29
 
30
30
  const subpath = source.slice(name.length)
31
31
 
32
+ if (subpath === '/marketing' || subpath.startsWith('/marketing/')) return 'marketing'
32
33
  if (subpath === '/mobile' || subpath.startsWith('/mobile/')) return 'mobile'
33
34
  if (subpath === '' || subpath.startsWith('/fonts/') || subpath.startsWith('/icons')) return 'web'
34
35
  return undefined