@trypattern/sdk 0.0.0-stage → 0.1.1

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 (273) hide show
  1. package/README.md +127 -2
  2. package/dist/access.d.ts +31 -0
  3. package/dist/access.js +72 -0
  4. package/dist/actions.d.ts +57 -0
  5. package/dist/actions.js +198 -0
  6. package/dist/api.d.ts +30 -0
  7. package/dist/api.js +60 -0
  8. package/dist/app.d.ts +115 -0
  9. package/dist/app.js +266 -0
  10. package/dist/appInfo.d.ts +35 -0
  11. package/dist/appInfo.js +67 -0
  12. package/dist/appTitle.d.ts +6 -0
  13. package/dist/appTitle.js +3 -0
  14. package/dist/appearance.d.ts +7 -0
  15. package/dist/appearance.js +2 -0
  16. package/dist/auth/sessionApi.d.ts +41 -0
  17. package/dist/auth/sessionApi.js +158 -0
  18. package/dist/auth/sessionStore.d.ts +20 -0
  19. package/dist/auth/sessionStore.js +40 -0
  20. package/dist/auth/user.d.ts +11 -0
  21. package/dist/auth/user.js +9 -0
  22. package/dist/builtins/Account.d.ts +25 -0
  23. package/dist/builtins/Account.js +15 -0
  24. package/dist/builtins/AppSettings.d.ts +12 -0
  25. package/dist/builtins/AppSettings.js +31 -0
  26. package/dist/builtins/Palette.d.ts +29 -0
  27. package/dist/builtins/Palette.js +63 -0
  28. package/dist/builtins/SignIn.d.ts +28 -0
  29. package/dist/builtins/SignIn.js +60 -0
  30. package/dist/builtins/Toasts.d.ts +32 -0
  31. package/dist/builtins/Toasts.js +25 -0
  32. package/dist/builtins/actions.d.ts +2 -0
  33. package/dist/builtins/actions.js +45 -0
  34. package/dist/cache.d.ts +24 -0
  35. package/dist/cache.js +112 -0
  36. package/dist/cli/app.d.ts +2 -0
  37. package/dist/cli/app.js +1406 -0
  38. package/dist/cli/publishing.d.ts +21 -0
  39. package/dist/cli/publishing.js +493 -0
  40. package/dist/cli/screenshot.d.ts +1 -0
  41. package/dist/cli/screenshot.js +96 -0
  42. package/dist/cli/tools.d.ts +12 -0
  43. package/dist/cli/tools.js +35 -0
  44. package/dist/clock.d.ts +6 -0
  45. package/dist/clock.js +31 -0
  46. package/dist/components/AppFrame.d.ts +14 -0
  47. package/dist/components/AppFrame.js +64 -0
  48. package/dist/components/AppearancePicker.d.ts +1 -0
  49. package/dist/components/AppearancePicker.js +12 -0
  50. package/dist/components/Avatar.d.ts +9 -0
  51. package/dist/components/Avatar.js +63 -0
  52. package/dist/components/Badge.d.ts +11 -0
  53. package/dist/components/Badge.js +87 -0
  54. package/dist/components/Button.d.ts +24 -0
  55. package/dist/components/Button.js +252 -0
  56. package/dist/components/Card.d.ts +12 -0
  57. package/dist/components/Card.js +38 -0
  58. package/dist/components/CommandMenu.d.ts +23 -0
  59. package/dist/components/CommandMenu.js +214 -0
  60. package/dist/components/CommandPalette.d.ts +1 -0
  61. package/dist/components/CommandPalette.js +7 -0
  62. package/dist/components/Content.d.ts +7 -0
  63. package/dist/components/Content.js +24 -0
  64. package/dist/components/ContextMenu.d.ts +8 -0
  65. package/dist/components/ContextMenu.js +23 -0
  66. package/dist/components/CopyButton.d.ts +11 -0
  67. package/dist/components/CopyButton.js +16 -0
  68. package/dist/components/Dialog.d.ts +11 -0
  69. package/dist/components/Dialog.js +81 -0
  70. package/dist/components/Divider.d.ts +7 -0
  71. package/dist/components/Divider.js +30 -0
  72. package/dist/components/EmptyState.d.ts +8 -0
  73. package/dist/components/EmptyState.js +24 -0
  74. package/dist/components/Form.d.ts +9 -0
  75. package/dist/components/Form.js +23 -0
  76. package/dist/components/Icon.d.ts +10 -0
  77. package/dist/components/Icon.js +22 -0
  78. package/dist/components/IconButton.d.ts +14 -0
  79. package/dist/components/IconButton.js +53 -0
  80. package/dist/components/Kbd.d.ts +6 -0
  81. package/dist/components/Kbd.js +67 -0
  82. package/dist/components/Link.d.ts +14 -0
  83. package/dist/components/Link.js +44 -0
  84. package/dist/components/ListRow.d.ts +12 -0
  85. package/dist/components/ListRow.js +62 -0
  86. package/dist/components/LoadingRows.d.ts +5 -0
  87. package/dist/components/LoadingRows.js +6 -0
  88. package/dist/components/Menu.d.ts +12 -0
  89. package/dist/components/Menu.js +33 -0
  90. package/dist/components/MenuItems.d.ts +21 -0
  91. package/dist/components/MenuItems.js +32 -0
  92. package/dist/components/Placement.d.ts +21 -0
  93. package/dist/components/Placement.js +1 -0
  94. package/dist/components/Popup.d.ts +8 -0
  95. package/dist/components/Popup.js +43 -0
  96. package/dist/components/PopupItem.d.ts +8 -0
  97. package/dist/components/PopupItem.js +51 -0
  98. package/dist/components/PropertyRow.d.ts +7 -0
  99. package/dist/components/PropertyRow.js +23 -0
  100. package/dist/components/RadioGroup.d.ts +18 -0
  101. package/dist/components/RadioGroup.js +85 -0
  102. package/dist/components/Row.d.ts +16 -0
  103. package/dist/components/Row.js +27 -0
  104. package/dist/components/Screen.d.ts +13 -0
  105. package/dist/components/Screen.js +56 -0
  106. package/dist/components/Scrim.d.ts +8 -0
  107. package/dist/components/Scrim.js +40 -0
  108. package/dist/components/ScrollArea.d.ts +15 -0
  109. package/dist/components/ScrollArea.js +13 -0
  110. package/dist/components/SegmentedControl.d.ts +17 -0
  111. package/dist/components/SegmentedControl.js +68 -0
  112. package/dist/components/Select.d.ts +17 -0
  113. package/dist/components/Select.js +107 -0
  114. package/dist/components/SettingsRow.d.ts +8 -0
  115. package/dist/components/SettingsRow.js +32 -0
  116. package/dist/components/Sidebar.d.ts +20 -0
  117. package/dist/components/Sidebar.js +137 -0
  118. package/dist/components/SignInScreen.d.ts +1 -0
  119. package/dist/components/SignInScreen.js +40 -0
  120. package/dist/components/Size.d.ts +1 -0
  121. package/dist/components/Size.js +1 -0
  122. package/dist/components/Skeleton.d.ts +8 -0
  123. package/dist/components/Skeleton.js +48 -0
  124. package/dist/components/Spinner.d.ts +6 -0
  125. package/dist/components/Spinner.js +54 -0
  126. package/dist/components/Stack.d.ts +14 -0
  127. package/dist/components/Stack.js +19 -0
  128. package/dist/components/Switch.d.ts +10 -0
  129. package/dist/components/Switch.js +72 -0
  130. package/dist/components/Text.d.ts +21 -0
  131. package/dist/components/Text.js +77 -0
  132. package/dist/components/TextField.d.ts +25 -0
  133. package/dist/components/TextField.js +68 -0
  134. package/dist/components/Toaster.d.ts +1 -0
  135. package/dist/components/Toaster.js +83 -0
  136. package/dist/components/Tooltip.d.ts +8 -0
  137. package/dist/components/Tooltip.js +43 -0
  138. package/dist/components/controlLook.d.ts +70 -0
  139. package/dist/components/controlLook.js +80 -0
  140. package/dist/components/frame.d.ts +4 -0
  141. package/dist/components/frame.js +2 -0
  142. package/dist/components/icons.d.ts +59 -0
  143. package/dist/components/icons.js +111 -0
  144. package/dist/components/interaction.d.ts +12 -0
  145. package/dist/components/interaction.js +22 -0
  146. package/dist/components/spacing.d.ts +118 -0
  147. package/dist/components/spacing.js +46 -0
  148. package/dist/components/tones.d.ts +28 -0
  149. package/dist/components/tones.js +12 -0
  150. package/dist/entityStore.d.ts +46 -0
  151. package/dist/entityStore.js +160 -0
  152. package/dist/flows/accessFlows.d.ts +9 -0
  153. package/dist/flows/accessFlows.js +167 -0
  154. package/dist/flows/browser.d.ts +34 -0
  155. package/dist/flows/browser.js +167 -0
  156. package/dist/flows/contactSheet.d.ts +1 -0
  157. package/dist/flows/contactSheet.js +63 -0
  158. package/dist/flows/flowBrowser.d.ts +25 -0
  159. package/dist/flows/flowBrowser.js +23 -0
  160. package/dist/flows/flowSetup.d.ts +3 -0
  161. package/dist/flows/flowSetup.js +35 -0
  162. package/dist/flows/flows.d.ts +47 -0
  163. package/dist/flows/flows.js +175 -0
  164. package/dist/flows/screenshotName.d.ts +1 -0
  165. package/dist/flows/screenshotName.js +6 -0
  166. package/dist/gate.d.ts +8 -0
  167. package/dist/gate.js +52 -0
  168. package/dist/hooks/appContext.d.ts +15 -0
  169. package/dist/hooks/appContext.js +5 -0
  170. package/dist/hooks/appHooks.d.ts +21 -0
  171. package/dist/hooks/appHooks.js +24 -0
  172. package/dist/hooks/useAnimatesOnChange.d.ts +1 -0
  173. package/dist/hooks/useAnimatesOnChange.js +14 -0
  174. package/dist/hooks/useStoreState.d.ts +6 -0
  175. package/dist/hooks/useStoreState.js +5 -0
  176. package/dist/index.d.ts +44 -0
  177. package/dist/index.js +21 -0
  178. package/dist/memoryApi.d.ts +19 -0
  179. package/dist/memoryApi.js +42 -0
  180. package/dist/model.d.ts +94 -0
  181. package/dist/model.js +243 -0
  182. package/dist/page.d.ts +11 -0
  183. package/dist/page.js +9 -0
  184. package/dist/platform.d.ts +1 -0
  185. package/dist/platform.js +5 -0
  186. package/dist/publishWire.d.ts +271 -0
  187. package/dist/publishWire.js +168 -0
  188. package/dist/react.d.ts +49 -0
  189. package/dist/react.js +40 -0
  190. package/dist/registered.d.ts +60 -0
  191. package/dist/registered.js +19 -0
  192. package/dist/routes.d.ts +38 -0
  193. package/dist/routes.js +21 -0
  194. package/dist/rules/checkAllFiles.d.ts +1 -0
  195. package/dist/rules/checkAllFiles.js +749 -0
  196. package/dist/rules/checkApiRouting.d.ts +1 -0
  197. package/dist/rules/checkApiRouting.js +112 -0
  198. package/dist/rules/lintPlugin.d.ts +252 -0
  199. package/dist/rules/lintPlugin.js +1159 -0
  200. package/dist/rules/messages.d.ts +48 -0
  201. package/dist/rules/messages.js +48 -0
  202. package/dist/rules/themeTokens.d.ts +6 -0
  203. package/dist/rules/themeTokens.js +64 -0
  204. package/dist/schema.d.ts +4 -0
  205. package/dist/schema.js +2 -0
  206. package/dist/server/auth.d.ts +115 -0
  207. package/dist/server/auth.js +134 -0
  208. package/dist/server/authService.d.ts +9 -0
  209. package/dist/server/authService.js +50 -0
  210. package/dist/server/createServer.d.ts +402 -0
  211. package/dist/server/createServer.js +82 -0
  212. package/dist/server/env.d.ts +15 -0
  213. package/dist/server/env.js +1 -0
  214. package/dist/server/index.d.ts +13 -0
  215. package/dist/server/index.js +9 -0
  216. package/dist/server/services.d.ts +9 -0
  217. package/dist/server/services.js +47 -0
  218. package/dist/server/session.d.ts +29 -0
  219. package/dist/server/session.js +65 -0
  220. package/dist/server/sessions.d.ts +92 -0
  221. package/dist/server/sessions.js +47 -0
  222. package/dist/server/settings.d.ts +49 -0
  223. package/dist/server/settings.js +25 -0
  224. package/dist/server/signInWire.d.ts +53 -0
  225. package/dist/server/signInWire.js +23 -0
  226. package/dist/server/tables.d.ts +242 -0
  227. package/dist/server/tables.js +246 -0
  228. package/dist/server/users.d.ts +189 -0
  229. package/dist/server/users.js +49 -0
  230. package/dist/serviceClients.d.ts +5 -0
  231. package/dist/serviceClients.js +70 -0
  232. package/dist/services.d.ts +53 -0
  233. package/dist/services.js +30 -0
  234. package/dist/shortcuts.d.ts +3 -0
  235. package/dist/shortcuts.js +40 -0
  236. package/dist/start.d.ts +20 -0
  237. package/dist/start.js +145 -0
  238. package/dist/state.d.ts +14 -0
  239. package/dist/state.js +17 -0
  240. package/dist/store.d.ts +45 -0
  241. package/dist/store.js +208 -0
  242. package/dist/subscribers.d.ts +5 -0
  243. package/dist/subscribers.js +13 -0
  244. package/dist/table.d.ts +143 -0
  245. package/dist/table.js +91 -0
  246. package/dist/tables.d.ts +77 -0
  247. package/dist/tables.js +216 -0
  248. package/dist/theme/reset.css +84 -0
  249. package/dist/theme/scales.d.ts +76 -0
  250. package/dist/theme/scales.js +82 -0
  251. package/dist/theme/tokens.stylex.d.ts +218 -0
  252. package/dist/theme/tokens.stylex.js +233 -0
  253. package/dist/vite/commandBridge.d.ts +2 -0
  254. package/dist/vite/commandBridge.js +46 -0
  255. package/dist/vite/designManifest.d.ts +25 -0
  256. package/dist/vite/designManifest.js +191 -0
  257. package/dist/vite/localWorker.d.ts +4 -0
  258. package/dist/vite/localWorker.js +60 -0
  259. package/dist/vite/projectFile.d.ts +9 -0
  260. package/dist/vite/projectFile.js +17 -0
  261. package/dist/vite/rootAlias.d.ts +2 -0
  262. package/dist/vite/rootAlias.js +15 -0
  263. package/dist/vite/vite.d.ts +8 -0
  264. package/dist/vite/vite.js +95 -0
  265. package/dist/wire.d.ts +7 -0
  266. package/dist/wire.js +1 -0
  267. package/package.json +103 -3
  268. package/presets/lintPlugin.js +7 -0
  269. package/presets/oxlint.json +167 -0
  270. package/presets/register.d.ts +21 -0
  271. package/presets/server.d.ts +2 -0
  272. package/presets/tsconfig.app.json +29 -0
  273. package/presets/tsconfig.server.json +27 -0
@@ -0,0 +1,218 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export declare const breakpoints: {
3
+ compact: string;
4
+ reducedMotion: string;
5
+ coarsePointer: string;
6
+ };
7
+ export declare const colors: stylex.VarGroup<Readonly<{
8
+ blackFill: string;
9
+ blackTransparent: string;
10
+ borderDefault: string;
11
+ borderInverted: string;
12
+ borderOnStandout: string;
13
+ borderStrong: string;
14
+ borderStrongSolid: string;
15
+ borderSubtle: string;
16
+ brandBorderDefault: string;
17
+ brandBorderFocus: string;
18
+ brandBorderSubtle: string;
19
+ brandGradientSubtle: string;
20
+ brandForeground: string;
21
+ brandSolid: string;
22
+ brandSolidActive: string;
23
+ brandSolidHover: string;
24
+ brandSubtle: string;
25
+ brandSubtleHover: string;
26
+ card: string;
27
+ component: string;
28
+ componentActive: string;
29
+ componentHover: string;
30
+ componentOnContainerStrong: string;
31
+ componentOnContainerStrongHover: string;
32
+ componentOnContainerSubtle: string;
33
+ componentOnContainerSubtleHover: string;
34
+ componentOnInverted: string;
35
+ componentOnSunken: string;
36
+ container: string;
37
+ containerRecessed: string;
38
+ dangerBorderDefault: string;
39
+ dangerBorderSubtle: string;
40
+ dangerForeground: string;
41
+ dangerSolid: string;
42
+ dangerSolidActive: string;
43
+ dangerSolidHover: string;
44
+ dangerSubtle: string;
45
+ dangerSubtleActive: string;
46
+ dangerSubtleHover: string;
47
+ disabled: string;
48
+ divider: string;
49
+ disabledForeground: string;
50
+ invertedSolid: string;
51
+ invertedSolidActive: string;
52
+ invertedSolidHover: string;
53
+ modal: string;
54
+ onBrandSolidForeground: string;
55
+ onBrandSubtleForeground: string;
56
+ onDangerSolidForeground: string;
57
+ onDangerSubtleForeground: string;
58
+ onInvertedForeground: string;
59
+ onPositiveSolidForeground: string;
60
+ onPositiveSubtleForeground: string;
61
+ onStandoutPrimaryForeground: string;
62
+ onStandoutSecondaryForeground: string;
63
+ onWarningSolidForeground: string;
64
+ onWarningSubtleForeground: string;
65
+ page: string;
66
+ positiveBorderDefault: string;
67
+ positiveForeground: string;
68
+ positiveSolid: string;
69
+ positiveSolidHover: string;
70
+ positiveSubtle: string;
71
+ positiveSubtleHover: string;
72
+ primaryForeground: string;
73
+ secondaryForeground: string;
74
+ secondaryForegroundSolid: string;
75
+ shell: string;
76
+ standout: string;
77
+ sunken: string;
78
+ tertiaryForeground: string;
79
+ transparent: string;
80
+ transparentActive: string;
81
+ transparentHover: string;
82
+ warningBorderDefault: string;
83
+ warningForeground: string;
84
+ warningSolid: string;
85
+ warningSolidHover: string;
86
+ warningSubtle: string;
87
+ warningSubtleHover: string;
88
+ whiteFill: string;
89
+ dangerText: string;
90
+ indicatorBorder: string;
91
+ overlay: string;
92
+ }>, symbol>;
93
+ export declare const space: stylex.VarGroup<Readonly<{
94
+ xxs: string;
95
+ xs: string;
96
+ sm: string;
97
+ md: string;
98
+ lg: string;
99
+ xl: string;
100
+ xxl: string;
101
+ xxxl: string;
102
+ }>, symbol>;
103
+ export declare const controls: stylex.VarGroup<Readonly<{
104
+ heightXs: string;
105
+ heightSm: string;
106
+ heightMd: string;
107
+ heightLg: string;
108
+ heightXl: string;
109
+ paddingXs: string;
110
+ paddingSm: string;
111
+ paddingMd: string;
112
+ paddingLg: string;
113
+ paddingXl: string;
114
+ gapXs: string;
115
+ gapSm: string;
116
+ gapMd: string;
117
+ gapLg: string;
118
+ gapXl: string;
119
+ }>, symbol>;
120
+ export declare const iconSizes: stylex.VarGroup<Readonly<{
121
+ xs: string;
122
+ sm: string;
123
+ md: string;
124
+ lg: string;
125
+ xl: string;
126
+ }>, symbol>;
127
+ export declare const borders: stylex.VarGroup<Readonly<{
128
+ hairline: string;
129
+ thin: string;
130
+ }>, symbol>;
131
+ export declare const widths: stylex.VarGroup<Readonly<{
132
+ contentXs: string;
133
+ contentSm: string;
134
+ contentMd: string;
135
+ contentLg: string;
136
+ sidebar: string;
137
+ toast: string;
138
+ }>, symbol>;
139
+ export declare const layers: {
140
+ scrim: string;
141
+ sidebar: string;
142
+ menu: string;
143
+ tooltip: string;
144
+ dialog: string;
145
+ toast: string;
146
+ };
147
+ export declare const radii: stylex.VarGroup<Readonly<{
148
+ xs: string;
149
+ sm: string;
150
+ md: string;
151
+ lg: string;
152
+ xl: string;
153
+ xxl: string;
154
+ xxxl: string;
155
+ xxxxl: string;
156
+ full: string;
157
+ }>, symbol>;
158
+ export declare const fontSizes: stylex.VarGroup<Readonly<{
159
+ captionXs: string;
160
+ captionSm: string;
161
+ captionBase: string;
162
+ captionLg: string;
163
+ bodySm: string;
164
+ bodyBase: string;
165
+ bodyLg: string;
166
+ heading6: string;
167
+ heading5: string;
168
+ heading4: string;
169
+ heading3: string;
170
+ heading2: string;
171
+ heading1: string;
172
+ }>, symbol>;
173
+ export declare const lineHeights: stylex.VarGroup<Readonly<{
174
+ captionXs: string;
175
+ caption: string;
176
+ title: string;
177
+ bodySm: string;
178
+ body: string;
179
+ heading6: string;
180
+ heading5: string;
181
+ heading4: string;
182
+ heading3: string;
183
+ heading2: string;
184
+ heading1: string;
185
+ }>, symbol>;
186
+ export declare const fonts: stylex.VarGroup<Readonly<{
187
+ sans: string;
188
+ mono: string;
189
+ }>, symbol>;
190
+ export declare const fontFeatures: stylex.VarGroup<Readonly<{
191
+ sans: string;
192
+ kbd: string;
193
+ }>, symbol>;
194
+ export declare const fontWeights: stylex.VarGroup<Readonly<{
195
+ normal: string;
196
+ semimedium: string;
197
+ medium: string;
198
+ semibold: string;
199
+ bold: string;
200
+ }>, symbol>;
201
+ export declare const shadows: stylex.VarGroup<Readonly<{
202
+ border: string;
203
+ default: string;
204
+ large: string;
205
+ extraLarge: string;
206
+ }>, symbol>;
207
+ export declare const motion: stylex.VarGroup<Readonly<{
208
+ easeOut: string;
209
+ easeInOut: string;
210
+ slideEasing: string;
211
+ instant: string;
212
+ exit: string;
213
+ fast: string;
214
+ base: string;
215
+ slide: string;
216
+ pulse: string;
217
+ spin: string;
218
+ }>, symbol>;
@@ -0,0 +1,233 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export const breakpoints = stylex.defineConsts({
3
+ compact: '@media (max-width: 767px)',
4
+ reducedMotion: '@media (prefers-reduced-motion: reduce)',
5
+ coarsePointer: '@media (pointer: coarse)'
6
+ });
7
+ export const colors = stylex.defineVars({
8
+ blackFill: '#000',
9
+ blackTransparent: '#0000',
10
+ borderDefault: 'light-dark(#0000000f, #ffffff12)',
11
+ borderInverted: 'light-dark(#000, #fff)',
12
+ borderOnStandout: 'light-dark(#ffffff1a, #ffffff0d)',
13
+ borderStrong: 'light-dark(#00000026, #ffffff2c)',
14
+ borderStrongSolid: 'light-dark(#d9d9d9, #3a3a3a)',
15
+ borderSubtle: 'light-dark(#00000006, #ffffff09)',
16
+ brandBorderDefault: 'light-dark(#0088f653, #0f89fd7f)',
17
+ brandBorderFocus: 'light-dark(#0084e6a1, #0090ff)',
18
+ brandBorderSubtle: 'light-dark(#0093ff3d, #0081fd6b)',
19
+ brandGradientSubtle: 'linear-gradient(90deg, #ef5f0033 20%, #c2007a28 40%, #53009e25 60%, #0086f032 80%)',
20
+ brandForeground: 'light-dark(#0086f0fa, #3b9eff)',
21
+ brandSolid: '#0090ff',
22
+ brandSolidActive: 'light-dark(#0d74ce, #70b8ff)',
23
+ brandSolidHover: 'light-dark(#0588f0, #3b9eff)',
24
+ brandSubtle: 'light-dark(#008ff519, #0077ff3a)',
25
+ brandSubtleHover: 'light-dark(#009eff2a, #0075ff57)',
26
+ card: 'light-dark(#00000006, #ffffff09)',
27
+ component: 'light-dark(#0000000f, #ffffff12)',
28
+ componentActive: 'light-dark(#0000001f, #fff2)',
29
+ componentHover: 'light-dark(#00000017, #ffffff1b)',
30
+ componentOnContainerStrong: 'light-dark(#fff, #ffffff12)',
31
+ componentOnContainerStrongHover: 'light-dark(#f9f9f9, #ffffff1b)',
32
+ componentOnContainerSubtle: 'light-dark(#fff, #ffffff09)',
33
+ componentOnContainerSubtleHover: 'light-dark(#fff, #ffffff12)',
34
+ componentOnInverted: 'light-dark(#ffffff1a, #0000001a)',
35
+ componentOnSunken: 'light-dark(#fff, #2a2a2a)',
36
+ container: 'light-dark(#fff, #111)',
37
+ containerRecessed: 'light-dark(#fcfcfc, #111)',
38
+ dangerBorderDefault: 'light-dark(#f92d0050, #ff4f3864)',
39
+ dangerBorderSubtle: 'light-dark(#ff35002c, #fd201142)',
40
+ dangerForeground: 'light-dark(#d72400da, #ff6847eb)',
41
+ dangerSolid: '#e54d2e',
42
+ dangerSolidActive: 'light-dark(#d13415, #ff977d)',
43
+ dangerSolidHover: 'light-dark(#dd4425, #ec6142)',
44
+ dangerSubtle: 'light-dark(#ff200008, #ff55330f)',
45
+ dangerSubtleActive: 'light-dark(#ff2e003d, #fe332153)',
46
+ dangerSubtleHover: 'light-dark(#f52b0018, #ff35232b)',
47
+ disabled: 'light-dark(#0000000f, #ffffff09)',
48
+ divider: 'light-dark(#0000000f, #ffffff1f)',
49
+ disabledForeground: 'light-dark(#0004, #fff5)',
50
+ invertedSolid: 'light-dark(#000000f2, #fffffff2)',
51
+ invertedSolidActive: 'light-dark(#000000b3, #ffffffb3)',
52
+ invertedSolidHover: 'light-dark(#000c, #fffc)',
53
+ modal: 'light-dark(oklch(100% 0 0), oklch(25.2% 0 0))',
54
+ onBrandSolidForeground: '#fff',
55
+ onBrandSubtleForeground: 'light-dark(#0090ff, #70b8ff)',
56
+ onDangerSolidForeground: 'light-dark(#fffcfc, #fff)',
57
+ onDangerSubtleForeground: 'light-dark(#df2600d1, #ff977d)',
58
+ onInvertedForeground: 'light-dark(#fff, #000)',
59
+ onPositiveSolidForeground: 'light-dark(#fbfefc, #fff)',
60
+ onPositiveSubtleForeground: 'light-dark(#008f4acf, #46fea5d4)',
61
+ onStandoutPrimaryForeground: 'light-dark(#fff, #ffffffed)',
62
+ onStandoutSecondaryForeground: '#ffffff80',
63
+ onWarningSolidForeground: 'light-dark(#fefcfb, #fff)',
64
+ onWarningSubtleForeground: 'light-dark(#cc4e00, #ffa057)',
65
+ page: 'light-dark(#fff, oklch(15% 0 0))',
66
+ positiveBorderDefault: 'light-dark(#00963c52, #44ffaa4b)',
67
+ positiveForeground: 'light-dark(#008647d4, #43fea4ab)',
68
+ positiveSolid: '#30a46c',
69
+ positiveSolidHover: 'light-dark(#2b9a66, #33b074)',
70
+ positiveSubtle: 'light-dark(#00a43319, #22ff991e)',
71
+ positiveSubtleHover: 'light-dark(#00a83829, #11ff992d)',
72
+ primaryForeground: 'light-dark(#000000df, #ffffffed)',
73
+ secondaryForeground: 'light-dark(#0000009b, #ffffffaf)',
74
+ secondaryForegroundSolid: 'light-dark(#646464, #b4b4b4)',
75
+ shell: 'light-dark(oklch(97.3% 0 0), #000)',
76
+ standout: 'light-dark(#202020, #222)',
77
+ sunken: 'light-dark(#0000000d, #0006)',
78
+ tertiaryForeground: 'light-dark(#00000072, #ffffff64)',
79
+ transparent: '#0000',
80
+ transparentActive: 'light-dark(#0000000f, #ffffff12)',
81
+ transparentHover: 'light-dark(#0000000f, #ffffff1b)',
82
+ warningBorderDefault: 'light-dark(#ff81007d, #fd75045c)',
83
+ warningForeground: 'light-dark(#ef5f00, #ff801f)',
84
+ warningSolid: '#f76b15',
85
+ warningSolidHover: 'light-dark(#ef5f00, #ff801f)',
86
+ warningSubtle: 'light-dark(#ff9c0029, #fb6a0025)',
87
+ warningSubtleHover: 'light-dark(#ff91014a, #ff590039)',
88
+ whiteFill: '#fff',
89
+ dangerText: 'light-dark(#cd2200ea, #ff977d)',
90
+ indicatorBorder: 'light-dark(#d9d9d9, #484848)',
91
+ overlay: 'light-dark(#0006, #0009)'
92
+ });
93
+ export const space = stylex.defineVars({
94
+ xxs: '2px',
95
+ xs: '4px',
96
+ sm: '8px',
97
+ md: '12px',
98
+ lg: '16px',
99
+ xl: '24px',
100
+ xxl: '32px',
101
+ xxxl: '48px'
102
+ });
103
+ export const controls = stylex.defineVars({
104
+ heightXs: '20px',
105
+ heightSm: '24px',
106
+ heightMd: '28px',
107
+ heightLg: '32px',
108
+ heightXl: '40px',
109
+ paddingXs: '6px',
110
+ paddingSm: '8px',
111
+ paddingMd: '10px',
112
+ paddingLg: '12px',
113
+ paddingXl: '14px',
114
+ gapXs: '4px',
115
+ gapSm: '4px',
116
+ gapMd: '6px',
117
+ gapLg: '6px',
118
+ gapXl: '8px'
119
+ });
120
+ export const iconSizes = stylex.defineVars({
121
+ xs: '12px',
122
+ sm: '14px',
123
+ md: '16px',
124
+ lg: '16px',
125
+ xl: '20px'
126
+ });
127
+ export const borders = stylex.defineVars({
128
+ hairline: '0.5px',
129
+ thin: '1px'
130
+ });
131
+ export const widths = stylex.defineVars({
132
+ contentXs: '280px',
133
+ contentSm: '480px',
134
+ contentMd: '640px',
135
+ contentLg: '720px',
136
+ sidebar: '280px',
137
+ toast: '356px'
138
+ });
139
+ export const layers = stylex.defineConsts({
140
+ scrim: '15',
141
+ sidebar: '20',
142
+ menu: '20',
143
+ tooltip: '30',
144
+ dialog: '40',
145
+ toast: '40'
146
+ });
147
+ export const radii = stylex.defineVars({
148
+ xs: '2px',
149
+ sm: '4px',
150
+ md: '6px',
151
+ lg: '8px',
152
+ xl: '10px',
153
+ xxl: '12px',
154
+ xxxl: '16px',
155
+ xxxxl: '20px',
156
+ full: '9999px'
157
+ });
158
+ export const fontSizes = stylex.defineVars({
159
+ captionXs: '8px',
160
+ captionSm: '10px',
161
+ captionBase: '11px',
162
+ captionLg: '12px',
163
+ bodySm: '13px',
164
+ bodyBase: '15px',
165
+ bodyLg: '18px',
166
+ heading6: '20px',
167
+ heading5: '24px',
168
+ heading4: '28px',
169
+ heading3: '36px',
170
+ heading2: '44px',
171
+ heading1: '56px'
172
+ });
173
+ export const lineHeights = stylex.defineVars({
174
+ captionXs: '12px',
175
+ caption: '16px',
176
+ title: '18px',
177
+ bodySm: '20px',
178
+ body: '24px',
179
+ heading6: '24px',
180
+ heading5: '32px',
181
+ heading4: '36px',
182
+ heading3: '44px',
183
+ heading2: '56px',
184
+ heading1: '56px'
185
+ });
186
+ export const fonts = stylex.defineVars({
187
+ sans: '"Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
188
+ mono: 'ui-monospace, SFMono-Regular, Menlo, monospace'
189
+ });
190
+ export const fontFeatures = stylex.defineVars({
191
+ sans: '"ss03"',
192
+ kbd: '"ss02"'
193
+ });
194
+ export const fontWeights = stylex.defineVars({
195
+ normal: '400',
196
+ semimedium: '450',
197
+ medium: '500',
198
+ semibold: '600',
199
+ bold: '700'
200
+ });
201
+ export const shadows = stylex.defineVars({
202
+ border: '0 0 0 1px light-dark(#00000012, #ffffff12)',
203
+ default: '0 0 0 .5px light-dark(#0000, #ffffff12) inset, 0 0 0 .5px light-dark(#0000000f, #0000), 0 1px 1px -1px light-dark(#0000001a, #0000), 0 1px 2px 0px light-dark(#0000000d, #0000)',
204
+ large: '0 0 0 .5px light-dark(color-mix(in oklab, #0000000f, #f0f0f0 25%), #0000), 0 0 0 1px light-dark(#0000, color-mix(in oklab, #ffffff12, #3a3a3a 25%)), 0 2px 3px -2px light-dark(#0000000f, #00000026), 0 3px 12px -4px light-dark(#0000001a, #0000), 0 4px 16px -8px light-dark(#0000000d, #0000), 0 3px 8px -2px light-dark(#0000, #0006), 0 4px 12px -4px light-dark(#0000, #00000080)',
205
+ extraLarge: '0 0 0 .5px light-dark(#0000, #ffffff12) inset, 0 0 0 .5px light-dark(#0000000f, #0000), 0 8px 40px 0px #0000000d, 0 12px 32px -16px #00000026'
206
+ });
207
+ export const motion = stylex.defineVars({
208
+ easeOut: 'cubic-bezier(0, 0, .2, 1)',
209
+ easeInOut: 'cubic-bezier(.4, 0, .2, 1)',
210
+ slideEasing: 'cubic-bezier(0.32, 0.72, 0, 1)',
211
+ instant: {
212
+ default: '75ms',
213
+ '@media (prefers-reduced-motion: reduce)': '0ms'
214
+ },
215
+ exit: {
216
+ default: '120ms',
217
+ '@media (prefers-reduced-motion: reduce)': '0ms'
218
+ },
219
+ fast: {
220
+ default: '150ms',
221
+ '@media (prefers-reduced-motion: reduce)': '0ms'
222
+ },
223
+ base: {
224
+ default: '200ms',
225
+ '@media (prefers-reduced-motion: reduce)': '0ms'
226
+ },
227
+ slide: {
228
+ default: '300ms',
229
+ '@media (prefers-reduced-motion: reduce)': '0ms'
230
+ },
231
+ pulse: '2s',
232
+ spin: '1200ms'
233
+ });
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare function commandBridge(): Plugin;
@@ -0,0 +1,46 @@
1
+ const COMMAND_EVENT = 'pattern:command';
2
+ const REPLY_EVENT = 'pattern:reply';
3
+ const REPLY_TIMEOUT_MS = 3000;
4
+ const NO_APP_OPEN = 'No Pattern app is open in a browser. Open the dev server URL (app start opens it), then send again.';
5
+ export function commandBridge() {
6
+ return {
7
+ name: 'pattern-command-bridge',
8
+ apply: 'serve',
9
+ configureServer(server) {
10
+ const waiting = new Map();
11
+ server.ws.on(REPLY_EVENT, (reply) => {
12
+ waiting.get(reply.id)?.(reply);
13
+ waiting.delete(reply.id);
14
+ });
15
+ server.middlewares.use('/__pattern/send', (request, response) => {
16
+ let body = '';
17
+ request.on('data', (chunk) => (body += chunk.toString()));
18
+ request.on('end', () => {
19
+ const id = crypto.randomUUID();
20
+ const respond = (status, payload) => {
21
+ response.statusCode = status;
22
+ response.setHeader('content-type', 'application/json');
23
+ response.end(JSON.stringify(payload));
24
+ };
25
+ let command;
26
+ try {
27
+ command = JSON.parse(body);
28
+ }
29
+ catch {
30
+ respond(400, { error: `Command is not valid JSON: ${body}` });
31
+ return;
32
+ }
33
+ const timer = setTimeout(() => {
34
+ waiting.delete(id);
35
+ respond(503, { error: NO_APP_OPEN });
36
+ }, REPLY_TIMEOUT_MS);
37
+ waiting.set(id, (reply) => {
38
+ clearTimeout(timer);
39
+ respond(200, reply);
40
+ });
41
+ server.ws.send(COMMAND_EVENT, { id, command });
42
+ });
43
+ });
44
+ }
45
+ };
46
+ }
@@ -0,0 +1,25 @@
1
+ type Counts = Record<string, number>;
2
+ type PrimitiveUse = {
3
+ uses: number;
4
+ props: Record<string, Counts>;
5
+ };
6
+ type TokenEntry = {
7
+ value: string;
8
+ isOverridden: boolean;
9
+ };
10
+ export type DesignManifest = {
11
+ sdk: string;
12
+ tokens: Record<string, Record<string, TokenEntry>>;
13
+ primitives: Record<string, PrimitiveUse>;
14
+ customPieces: {
15
+ name: string;
16
+ file: string;
17
+ tokens: string[];
18
+ }[];
19
+ icons: {
20
+ builtIn: string[];
21
+ app: string[];
22
+ };
23
+ };
24
+ export declare function designManifest(root: string): DesignManifest;
25
+ export {};